cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajani Karuturi <Rajani.Karut...@citrix.com>
Subject Re: Yet another mail on code quality
Date Wed, 26 Feb 2014 06:31:28 GMT
intellij findbugs plugin can be downloaded @ http://plugins.jetbrains.com/plugin/3847
once its installed, you can right click on the file -> FindBugs -> Analyze current file
This will show the results in the find bugs console with a nice explanation for each error.

you could also run $mvn findbugs:check -PDeveloper -Dsimulator -pl :cloud-plugin-hypervisor-simulator
from the source root for any project.
The results will also be at SOURCE-ROOT/module-dir/target/findbugs.xml

~Rajani



On 26-Feb-2014, at 11:03 am, Abhinandan Prateek <Abhinandan.Prateek@citrix.com<mailto:Abhinandan.Prateek@citrix.com>>
wrote:

Hugo,

 It will benefit the community if you can advise on how to setup the find
bug tool. Is there a wiki on how to use find bug ?
I know some tools that you can install on eclipse, but not sure about
intellij etc.

-abhi

On 24/02/14 9:44 pm, "Hugo Trippaers" <hugo@trippaers.nl<mailto:hugo@trippaers.nl>>
wrote:

Guys,

Please pay attention to the code you are committing. Today i fixed a
number of issues that were introduced in recent code, these are bugs that
could have been prevented from entering master by either testing or
running the findbugs checks. One was committed directly, the other one
through a reviewed patch.


@@ -116,7 +116,7 @@ public class Upgrade430to440 implements DbUpgrade {
                       if (networkRs.next()) {
                           String guesttype = networkRs.getString(1);

-                            if (guesttype ==
Network.GuestType.Shared.toString()) {
+                            if
(guesttype.equals(Network.GuestType.Shared.toString())) {
                               pstmtUpdate =
conn.prepareStatement("UPDATE `cloud`.`user_ip_address` SET account_id =
?, domain_id= ? WHERE public_ip_address = ?");
                               pstmtUpdate.setLong(1,vmAccountId);
                               pstmtUpdate.setLong(2,vmDomainId);



@@ -80,11 +80,11 @@ public class LibvirtStoragePoolXMLParser {
               String targetPath = getTagValue("path", target);

               String portValue = getAttrValue("host", "port", source);
-                if (portValue != "")
+                if (portValue != null && !portValue.isEmpty())
                   port = Integer.parseInt(portValue);

               return new
LibvirtStoragePoolDef(LibvirtStoragePoolDef.poolType.valueOf(format.toUppe
rCase()),


To help, i¹ve configured the slowbuild to alert if the number of high
priority findings from findbugs differs from the previous run. It will
notify all developers that had changes during this period (slowbuild runs
every 4 hours).

Cheers,

Hugo


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message