Bug 990200

Summary: Static Analysis cleanup of lower risk items
Product: [Other] RHQ Project Reporter: Mike Foley <mfoley>
Component: Core UIAssignee: Mike Thompson <mithomps>
Status: CLOSED UPSTREAM QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.9CC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHQ 4.9.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 13:09:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.