Exclude SF_SWITCH_NO_DEFAULT on FastDatePrinter

FastDatePrinter#appendFullDigits uses a switch case without 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:
Allon Mureinik 2017-04-01 12:18:53 +03:00 committed by pascalschumacher
parent 4d343ccc11
commit 8069e1c1ce
1 changed files with 8 additions and 0 deletions

View File

@ -150,6 +150,14 @@
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
</Match>
<!-- Reason: FindBugs cannot correctly recognize default branches in switch statements without break statements.
See, e.g., the report at https://sourceforge.net/p/findbugs/bugs/1298 -->
<Match>
<Class name="org.apache.commons.lang3.time.FastDatePrinter"/>
<Method name="appendFullDigits" params="java.lang.Appendable, int, int"/>
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
</Match>
<!-- Reason: The fallthrough on the swich stateme is intentional -->
<Match>
<Class name="org.apache.commons.lang3.time.FastDatePrinter"/>