Bug 990200 - Static Analysis cleanup of lower risk items
Summary: Static Analysis cleanup of lower risk items
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: RHQ 4.9
Assignee: Mike Thompson
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-30 14:46 UTC by Mike Foley
Modified: 2013-08-01 13:09 UTC (History)
1 user (show)

Fixed In Version: RHQ 4.9.0
Clone Of:
Environment:
Last Closed: 2013-08-01 13:09:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Mike Foley 2013-07-30 14:46:27 UTC
Description of problem:  OverviewForm.java:134, DLS_DEAD_LOCAL_STORE, Priority: High  




Additional info:

http://jenkins.jonqe.lab.eng.bos.redhat.com:9080/job/rhq-master-build-findbugs/19/findbugsResult/module.-496923596/


OverviewForm.java:134, DLS_DEAD_LOCAL_STORE, Priority: High
Dead store to notNullValidator in org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.OverviewForm.buildForm(ResourceType)

This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

At the Static Code Analysis review meeting, MikeT stated he would like to address this.

Comment 1 Mike Thompson 2013-07-31 19:11:31 UTC
As this was such a small issue I have included most the: 
Category MALICIOUS_CODE - Type MS_SHOULD_BE_FINAL

http://jenkins.jonqe.lab.eng.bos.redhat.com:9080/job/rhq-master-build-findbugs/19/findbugsResult/module.-496923596/category.-1516912906/type.-1710921011/

This should cleanup the stats (and code) a bit. This stuff was not major but the report is technically correct. Mostly the portlet static factories that should have final static instances since they are static inner classes were scrubbed. And cleaner code is always good.



We should always strive for ways that objectively (via tools) tells us about our code quality.

This was committed to master with commit id: 300fe85.

Comment 2 Mike Foley 2013-08-01 13:09:51 UTC
These changes will be covered by automated tests, regression tests.  No specific QE tasks required.


Note You need to log in before you can comment on or make changes to this bug.