Skip to content

Commit

Permalink
Omit spotbugs CT_CONSTRUCTOR_THROWS visitor
Browse files Browse the repository at this point in the history
From jenkinsci/plugin-pom#869 (comment)

> Discussion in spotbugs/spotbugs#2695
> https://wiki.sei.cmu.edu/confluence/display/java/OBJ11-J.+Be+wary+of+letting+constructors+throw+exceptions
> seems to relate to libraries used with SecurityManager which is dead
> and certainly does not apply to Jenkins; we do not expect untrusted code
> to be running inside the controller JVM, and it does not seem plausible
> that finalizer abuse would happen by accident.
  • Loading branch information
MarkEWaite committed Dec 21, 2023
1 parent f8c18fc commit b2a92fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
<spotbugs-maven-plugin.version>4.8.2.0</spotbugs-maven-plugin.version>
<spotbugs.effort>Max</spotbugs.effort>
<spotbugs.threshold>Low</spotbugs.threshold>
<!-- TODO: Remove when plugin pom includes this omitVisitors -->
<!-- https://github.com/jenkinsci/plugin-pom/pull/869 -->
<spotbugs.omitVisitors>ConstructorThrow,FindReturnRef</spotbugs.omitVisitors>
<spotless.check.skip>false</spotless.check.skip>
</properties>

Expand Down
9 changes: 0 additions & 9 deletions src/spotbugs/excludesFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
Exclusions in this section have been triaged and determined to be
false positives.
-->
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Or>
<Class name="org.jenkinsci.plugins.badge.JobBadgeActionFactory" />
<Class name="org.jenkinsci.plugins.badge.RunBadgeActionFactory" />
<Class name="org.jenkinsci.plugins.badge.StatusImage" />
<Class name="org.jenkinsci.plugins.badge.actions.PublicBuildStatusAction" />
</Or>
</Match>
<Match>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
<Or>
Expand Down

0 comments on commit b2a92fd

Please sign in to comment.