Exclude SF_SWITCH_FALLTHROUGH on FastDatePrinter

FastDatePrinter#appendFullDigits uses a switch statement that
intentionally falls through the cases.
This patch adds a FindBugs suppression for it.


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/4d343ccc
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/4d343ccc
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/4d343ccc

Branch: refs/heads/master
Commit: 4d343ccc1181e306f8bb9431087ebb5e58b0c3c9
Parents: c40dcf6
Author: Allon Mureinik <amure...@redhat.com>
Authored: Sat Apr 1 12:38:54 2017 +0300
Committer: pascalschumacher <pascalschumac...@gmx.net>
Committed: Wed Apr 19 18:24:57 2017 +0200

----------------------------------------------------------------------
 findbugs-exclude-filter.xml | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/4d343ccc/findbugs-exclude-filter.xml
----------------------------------------------------------------------
diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml
index 772052a..edc6ead 100644
--- a/findbugs-exclude-filter.xml
+++ b/findbugs-exclude-filter.xml
@@ -150,6 +150,13 @@
     <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"/>
+    <Method name="appendFullDigits" params="java.lang.Appendable, int, int"/>
+    <Bug pattern="SF_SWITCH_FALLTHROUGH" />
+  </Match>
+
   <!-- Reason: Internal class that is used only as a key for an internal 
FormatCache. For this reason we can
    be sure, that equals will never be called with null or types other than 
MultipartKey.
   -->

Reply via email to