Author: bayard
Date: Sat May 16 08:16:29 2009
New Revision: 775427
URL: http://svn.apache.org/viewvc?rev=775427&view=rev
Log:
Hooking up findbugs exclude file and updating the exception cases
Modified:
commons/proper/lang/trunk/findbugs-exclude-filter.xml
commons/proper/lang/trunk/pom.xml
Modified: commons/proper/lang/trunk/findbugs-exclude-filter.xml
URL:
http://svn.apache.org/viewvc/commons/proper/lang/trunk/findbugs-exclude-filter.xml?rev=775427&r1=775426&r2=775427&view=diff
==============================================================================
--- commons/proper/lang/trunk/findbugs-exclude-filter.xml (original)
+++ commons/proper/lang/trunk/findbugs-exclude-filter.xml Sat May 16 08:16:29
2009
@@ -23,28 +23,79 @@
-->
<FindBugsFilter>
+ <!-- Reason: Optimization to use == -->
<Match>
<Class name="org.apache.commons.lang.BooleanUtils" />
<Method name="toBoolean" />
<Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ" />
</Match>
+ <!-- Reason: Optimization to use == -->
<Match>
<Class name="org.apache.commons.lang.StringUtils" />
<Method name="indexOfDifference"/>
<Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ" />
</Match>
+ <!-- Reason: Very much intended to do a fall through on the switch -->
<Match>
- <Class name="org.apache.commons.lang.BooleanUtils" />
- <Method name="negate"/>
- <Bug pattern="NP_BOOLEAN_RETURN_NULL" />
+ <Class name="org.apache.commons.lang.math.NumberUtils" />
+ <Method name="createNumber"/>
+ <Bug pattern="SF_SWITCH_FALLTHROUGH" />
</Match>
+ <!-- Reason: Very much intended to do a fall through on the switch -->
<Match>
- <Class name="org.apache.commons.lang.BooleanUtils" />
- <Method name="toBooleanObject"/>
- <Bug pattern="NP_BOOLEAN_RETURN_NULL" />
+ <Class name="org.apache.commons.lang.time.DateUtils" />
+ <Method name="getFragment"/>
+ <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+ </Match>
+
+ <!-- Reason: hashCode is lazily loaded in Range classes -->
+ <!-- TODO: Work out why regex didn't work here -->
+ <Match>
+ <Class name="org.apache.commons.lang.math.DoubleRange" />
+ <Field name="hashCode" />
+ <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
+ </Match>
+ <Match>
+ <Class name="org.apache.commons.lang.math.FloatRange" />
+ <Field name="hashCode" />
+ <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
+ </Match>
+ <Match>
+ <Class name="org.apache.commons.lang.math.IntRange" />
+ <Field name="hashCode" />
+ <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
+ </Match>
+ <Match>
+ <Class name="org.apache.commons.lang.math.LongRange" />
+ <Field name="hashCode" />
+ <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
+ </Match>
+ <Match>
+ <Class name="org.apache.commons.lang.math.NumberRange" />
+ <Field name="hashCode" />
+ <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
+ </Match>
+
+ <!-- Reason: toProperString is lazily loaded -->
+ <Match>
+ <Class name="org.apache.commons.lang.math.Fraction" />
+ <Field name="toProperString" />
+ <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
+ </Match>
+
+ <!-- Reason: It does call super.clone(), but via a subsequent method -->
+ <Match>
+ <Class name="org.apache.commons.lang.text.StrTokenizer" />
+ <Method name="clone"/>
+ <Bug pattern="CN_IDIOM_NO_SUPER_CALL" />
+ </Match>
+
+ <!-- Reason: Testing shows that new Integer(...) etc is quicker than
Integer.valueOf -->
+ <Match>
+ <Bug pattern="DM_NUMBER_CTOR" />
</Match>
</FindBugsFilter>
Modified: commons/proper/lang/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/commons/proper/lang/trunk/pom.xml?rev=775427&r1=775426&r2=775427&view=diff
==============================================================================
--- commons/proper/lang/trunk/pom.xml (original)
+++ commons/proper/lang/trunk/pom.xml Sat May 16 08:16:29 2009
@@ -461,6 +461,7 @@
<configuration>
<threshold>Normal</threshold>
<effort>Default</effort>
+ <excludeFilterFile>findbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>