Exclude SF_SWITCH_NO_DEFAULT on FastDateParser
FastDateParser#simpleQuote uses a switch case that actually has a default branch in it, but doesn't use break statements. SF_SWITCH_NO_DEFAULT unfortunately cannot recognize this pattern, and leave us with no choice but to suppress it.
This commit is contained in:
parent
3304965840
commit
c40dcf6598
|
@ -139,9 +139,14 @@
|
||||||
<Method name="insertFormats" />
|
<Method name="insertFormats" />
|
||||||
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
|
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
|
||||||
</Match>
|
</Match>
|
||||||
|
<!-- Reason: FindBugs does not correctly recognize default branches in switch statements without break statements.
|
||||||
|
See, e.g., the report at https://sourceforge.net/p/findbugs/bugs/1298 -->
|
||||||
<Match>
|
<Match>
|
||||||
<Class name="org.apache.commons.lang3.time.FastDateParser"/>
|
<Class name="org.apache.commons.lang3.time.FastDateParser"/>
|
||||||
|
<Or>
|
||||||
<Method name="getStrategy" />
|
<Method name="getStrategy" />
|
||||||
|
<Method name="simpleQuote" params="java.lang.StringBuilder, java.lang.String"/>
|
||||||
|
</Or>
|
||||||
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
|
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
|
||||||
</Match>
|
</Match>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue