Skip to content

Commit

Permalink
Suppress a few future spotbugs warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite committed May 9, 2024
1 parent 8b31877 commit bd39340
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/jenkinsci/plugins/badge/StatusImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import static javax.servlet.http.HttpServletResponse.*;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.PluginWrapper;
import java.awt.Canvas;
import java.awt.Font;
Expand Down Expand Up @@ -81,6 +82,7 @@ class StatusImage implements HttpResponse {
payload = new byte[0];
}

@SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "jInstance never to be null")
StatusImage(String fileName) throws IOException {
URL rootUrl = new URL(jInstance.getRootUrl());
etag = '"' + fileName + '"';
Expand Down
5 changes: 5 additions & 0 deletions src/spotbugs/excludesFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,9 @@
<Class name="org.jenkinsci.plugins.badge.extensions.BuildParameterRunSelectorExtension" />
<Method name="matchRule" />
</Match>
<Match>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
<Class name="org.jenkinsci.plugins.badge.dsl.AddEmbeddableBadgeConfigStep$Execution" />
<Method name="run" />
</Match>
</FindBugsFilter>

0 comments on commit bd39340

Please sign in to comment.