You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2023/12/17 00:06:25 UTC
(commons-bcel) branch master updated: Ignore specific spotbugs errors not the number
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
The following commit(s) were added to refs/heads/master by this push:
new bb9c610e Ignore specific spotbugs errors not the number
bb9c610e is described below
commit bb9c610e5e2dffd641b19681a480ded1f4025117
Author: Sebb <se...@apache.org>
AuthorDate: Sun Dec 17 00:06:19 2023 +0000
Ignore specific spotbugs errors not the number
---
pom.xml | 2 --
src/conf/spotbugs-exclude-filter.xml | 69 ++++++++++++++++++++++++++++++++++--
2 files changed, 66 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index 833a7f17..2035b710 100644
--- a/pom.xml
+++ b/pom.xml
@@ -330,8 +330,6 @@
<threshold>Normal</threshold>
<effort>Default</effort>
<excludeFilterFile>src/conf/spotbugs-exclude-filter.xml</excludeFilterFile>
- <!-- Hacky: Don't allow new SpotBugs errors -->
- <maxAllowedViolations>9</maxAllowedViolations>
</configuration>
</plugin>
<plugin>
diff --git a/src/conf/spotbugs-exclude-filter.xml b/src/conf/spotbugs-exclude-filter.xml
index 0698d4fa..f917b60c 100644
--- a/src/conf/spotbugs-exclude-filter.xml
+++ b/src/conf/spotbugs-exclude-filter.xml
@@ -62,10 +62,29 @@
<!-- Binary compatibility -->
<Match>
- <Bug pattern="EI_EXPOSE_STATIC_REP2"/>
- <Method name="clone"/>
- <Class name="org\.apache\.bcel\.Repository"/>
+ <Class name="org.apache.bcel.Repository"/>
<Method name="setRepository"/>
+ <Bug pattern="EI_EXPOSE_STATIC_REP2"/>
+ </Match>
+
+ <Match>
+ <Class name="org.apache.bcel.Repository"/>
+ <Method name="getRepository"/>
+ <Bug pattern="MS_EXPOSE_REP"/>
+ </Match>
+
+
+ <!--
+ TODO: this should probably be sinplified
+ Medium: Complicated, subtle or wrong increment in for-loop
+ org.apache.bcel.util.BCELifier.printFlags(int, BCELifier$FLAGS)
+ [org.apache.bcel.util.BCELifier] At BCELifier.java:[line 118]
+ QF_QUESTIONABLE_FOR_LOOP
+ -->
+ <Match>
+ <Class name="org.apache.bcel.util.BCELifier"/>
+ <Method name="printFlags" params="int, org.apache.bcel.util.BCELifier$FLAGS" returns="java.lang.String"/>
+ <Bug pattern="QF_QUESTIONABLE_FOR_LOOP"/>
</Match>
<!-- Reason: TODO, perhaps? -->
@@ -91,4 +110,48 @@
</Or>
</Match>
+ <!--
+ This is intentional
+ Error: Switch statement found in org.apache.bcel.util.BCELFactory.visitAllocationInstruction(AllocationInstruction)
+ where one case falls through to the next case
+ [org.apache.bcel.util.BCELFactory, org.apache.bcel.util.BCELFactory]
+ At BCELFactory.java:[lines 188-191]
+ Another occurrence at BCELFactory.java:[lines 192-196] SF_SWITCH_FALLTHROUGH
+ -->
+ <Match>
+ <Class name="org.apache.bcel.util.BCELFactory"/>
+ <Method name="visitAllocationInstruction"/>
+ <Bug pattern="SF_SWITCH_FALLTHROUGH"/>
+ </Match>
+
+ <!--
+ Class is deprecated
+ Error: The class name org.apache.bcel.util.ClassLoader
+ shadows the simple name of the superclass java.lang.ClassLoader
+ [org.apache.bcel.util.ClassLoader] At ClassLoader.java:[lines 59-178]
+ NM_SAME_SIMPLE_NAME_AS_SUPERCLASS
+ Error: org.apache.bcel.util.ClassLoader.DEFAULT_IGNORED_PACKAGES should be package protected
+ [org.apache.bcel.util.ClassLoader] At ClassLoader.java:[line 59]
+ MS_PKGPROTECT
+ -->
+ <Match>
+ <Class name="org.apache.bcel.util.ClassLoader"/>
+ <Or>
+ <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
+ <Bug pattern="MS_PKGPROTECT"/>
+ </Or>
+ </Match>
+
+ <!--
+ TODO: field is deprecated in preparation for making it private later
+ Error: org.apache.bcel.verifier.structurals.Frame._this should be package protected
+ [org.apache.bcel.verifier.structurals.Frame] In Frame.java
+ MS_PKGPROTECT
+ -->
+ <Match>
+ <Class name="org.apache.bcel.verifier.structurals.Frame"/>
+ <Field name="_this"/>
+ <Bug pattern="MS_PKGPROTECT"/>
+ </Match>
+
</FindBugsFilter>