You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2017/05/17 15:03:52 UTC
[08/50] [lang] Exclude SF_SWITCH_NO_DEFAULT on FastDatePrinter
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.
Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/8069e1c1
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/8069e1c1
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/8069e1c1
Branch: refs/heads/release
Commit: 8069e1c1ce7ec864c7bab2eae880742fac02376b
Parents: 4d343cc
Author: Allon Mureinik <am...@redhat.com>
Authored: Sat Apr 1 12:18:53 2017 +0300
Committer: pascalschumacher <pa...@gmx.net>
Committed: Wed Apr 19 18:24:57 2017 +0200
----------------------------------------------------------------------
findbugs-exclude-filter.xml | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8069e1c1/findbugs-exclude-filter.xml
----------------------------------------------------------------------
diff --git a/findbugs-exclude-filter.xml b/findbugs-exclude-filter.xml
index edc6ead..23dddbd 100644
--- a/findbugs-exclude-filter.xml
+++ b/findbugs-exclude-filter.xml
@@ -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"/>