Thanks Hugo. I had figured the issue reported from my commit. Will fix it.

Thanks
Rajesh Battala

-----Original Message-----
From: Trippie [mailto:trip...@gmail.com] On Behalf Of Hugo Trippaers
Sent: Tuesday, March 11, 2014 9:13 PM
To: <dev@cloudstack.apache.org>
Subject: FindBugs

Hey,

Just a reminder, findbugs is now checking the code periodically via Jenkins. 
See http://jenkins.buildacloud.org/job/build-master-slowbuild/

If this job fails it means a checking caused additional warning above the 250+ 
high findings we already have. Over the last few weeks the total number is 
going down, but please keep focus on this.

Also if you prepare a commit or a merge request, please run findbugs first to 
see if there are additional findings. This will help you in improving the 
quality of the code and save you from being blamed by Jenkins when it is 
finally committed. For example see build 
http://jenkins.buildacloud.org/job/build-master-slowbuild/404/changes here 2 
additional high importance findings where introduced by either Rajesh, Talluri 
or Sanjay.

One of them potentially interesting:
CreateServiceOfferingCmd.java:217, BC_IMPOSSIBLE_CAST, Priority: High 
Impossible cast from String to java.util.HashMap in 
org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd.getDetails()


This cast will always throw a ClassCastException. FindBugs tracks type 
information from instanceof checks, and also uses more precise information 
about the types of values returned from methods and loaded from fields. Thus, 
it may have more precise information that just the declared type of a variable, 
and can use this to determine that a cast will always throw an exception at 
runtime.



This page might help a bit if you are not familiar with FindBugs. 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Using+FindBugs

Cheers,

Hugo

Reply via email to