-
Bug
-
Resolution: Fixed
-
Major
-
None
Hudson 1.383, FindBugs Plugin 4.14
Maven multi-module build
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<effort>Default</effort>
<threshold>Default</threshold>
<failOnError>true</failOnError>
<includeTests>false</includeTests>
<findbugsXmlOutput>true</findbugsXmlOutput>
<xmlOutput>true</xmlOutput>
</configuration>
<executions>
<execution>
<id>findbugs-check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
We're incorrectly seeing low priority warnings in Hudson when the above configuration should not be generating any. Looking at both findbugs.xml and findbugsXml.xml confirms that only normal and high priority issues are included in the findbugs output files.
Here's what we're seeing in Hudson. Apologies for the formatting, I'll also attach a screenshot. Each group is a row in the "Warnings" tab of the Details section, each line is a cell. One interesting observation is that there are two Maven modules here; the first is reporting correctly, the second is reporting everything as Low priority.
File
Module
Package
Line
Priority
Type
Category
PricingProgramResource.java
tendril-platform-api-jaxrs
com.tendril.platform.api.rest
85
High
RC_REF_COMPARISON
CORRECTNESS
BillTestObjectFactory.java
tendril-platform-api-schema
com.tendril.platform.api
63
Low
DLS_DEAD_LOCAL_STORE
STYLE
BillTestObjectFactory.java
tendril-platform-api-schema
com.tendril.platform.api
77
Low
DLS_DEAD_LOCAL_STORE
STYLE
MeterReadingsMapper.java
tendril-platform-api-schema
com.tendril.platform.api.rest.mapper
118
Low
DM_NUMBER_CTOR
PERFORMANCE
findbugs.xml:
<BugInstance type="RC_REF_COMPARISON" priority="High" category="CORRECTNESS" message="Suspicious comparison of Integer references in com.tendril.platform.api.rest.PricingProgramResource.updatePricingProgram(Integer, PricingProgram)" lineNumber="85"/>
<BugInstance type="DLS_DEAD_LOCAL_STORE" priority="High" category="STYLE" message="Dead store to bucket2 in com.tendril.platform.api.BillTestObjectFactory.createBillConsumptionBuckets()" lineNumber="63"/>
<BugInstance type="DLS_DEAD_LOCAL_STORE" priority="High" category="STYLE" message="Dead store to bucket2 in com.tendril.platform.api.BillTestObjectFactory.createBillCostBuckets()" lineNumber="77"/>
<BugInstance type="DM_NUMBER_CTOR" priority="Normal" category="PERFORMANCE" message="Method com.tendril.platform.api.rest.mapper.MeterReadingsMapper.createMeterReadings(AccountConsumptionList) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead" lineNumber="118"/>
findbugsXml.xml:
<BugInstance category="CORRECTNESS" instanceHash="5c20efde23ef9b6b7cc91852b8a46503" instanceOccurrenceNum="0" priority="1" abbrev="RC" type="RC_REF_COMPARISON" instanceOccurrenceMax="0">
<BugInstance category="STYLE" instanceHash="cb3819105f76e57c21b8a03b0704b0e4" instanceOccurrenceNum="0" priority="1" abbrev="DLS" type="DLS_DEAD_LOCAL_STORE" instanceOccurrenceMax="0">
<BugInstance category="STYLE" instanceHash="a8145984419dc19ca65b3288186f7533" instanceOccurrenceNum="0" priority="1" abbrev="DLS" type="DLS_DEAD_LOCAL_STORE" instanceOccurrenceMax="0">
<BugInstance category="PERFORMANCE" instanceHash="3a9337b4f7249f324284f8bd12393b1c" instanceOccurrenceNum="0" priority="2" abbrev="Bx" type="DM_NUMBER_CTOR" instanceOccurrenceMax="0">