FindBugs exclude filter for StringUtils
Exclude ES_COMPARING_PARAMETER_STRING_WITH_EQ FindBugs warnings from StringUtils methods compare(String, String, boolean) and compareIgnoreCase(String, String, boolean). The usages of the == operator seem to be intentional optimizations similar to the usage in indexOfDifference. If this reasoning is ever overruled, this suppression should be removed.
This commit is contained in:
parent
5a52446090
commit
3304965840
|
@ -58,7 +58,11 @@
|
|||
<!-- Reason: Optimization to use == -->
|
||||
<Match>
|
||||
<Class name="org.apache.commons.lang3.StringUtils" />
|
||||
<Method name="indexOfDifference"/>
|
||||
<Or>
|
||||
<Method name="indexOfDifference"/>
|
||||
<Method name="compare" params="java.lang.String,java.lang.String,boolean"/>
|
||||
<Method name="compareIgnoreCase" params="java.lang.String,java.lang.String,boolean"/>
|
||||
</Or>
|
||||
<Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ" />
|
||||
</Match>
|
||||
|
||||
|
|
Loading…
Reference in New Issue