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 e280ebf commit 32d0ee7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/authorize-project-plugin</gitHubRepo>
<jenkins.version>2.401.3</jenkins.version>
<spotbugs.effort>Max</spotbugs.effort>
<!-- TODO: Remove when plugin pom is using this version or newer -->
<!-- https://github.com/jenkinsci/plugin-pom/pull/869 -->
<spotbugs-maven-plugin.version>4.8.2.0</spotbugs-maven-plugin.version>
<spotbugs.effort>Max</spotbugs.effort>
<!-- TODO: Remove when plugin pom includes this omitVisitors -->
<!-- https://github.com/jenkinsci/plugin-pom/pull/869 -->
<spotbugs.omitVisitors>ConstructorThrow,FindReturnRef</spotbugs.omitVisitors>
<spotbugs.threshold>Low</spotbugs.threshold>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand Down
4 changes: 0 additions & 4 deletions src/spotbugs/excludesFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
- If it is not a false positive, fix the bug, then remove the
exclusion from this section.
-->
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
<Class name="org.jenkinsci.plugins.authorizeproject.strategy.SpecificUsersAuthorizationStrategy"/>
</Match>
<Match>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
<Class name="org.jenkinsci.plugins.authorizeproject.GlobalQueueItemAuthenticator$DescriptorImpl"/>
Expand Down

0 comments on commit 32d0ee7

Please sign in to comment.