Skip to content

Commit 83c80e9

Browse files
committed
Ignore java 11 false positives
1 parent e3c7c33 commit 83c80e9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/jenkinsci/plugins/workflow/cps/CpsScmFlowDefinition.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
package org.jenkinsci.plugins.workflow.cps;
2626

27+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2728
import hudson.AbortException;
2829
import hudson.Extension;
2930
import hudson.FilePath;
@@ -35,7 +36,6 @@
3536
import hudson.model.Node;
3637
import hudson.model.Queue;
3738
import hudson.model.Run;
38-
import hudson.model.Run.RunnerAbortedException;
3939
import hudson.model.TaskListener;
4040
import hudson.model.TopLevelItem;
4141
import hudson.scm.SCM;
@@ -92,6 +92,11 @@ public boolean isLightweight() {
9292
this.lightweight = lightweight;
9393
}
9494

95+
@SuppressFBWarnings(
96+
value = {"NP_LOAD_OF_KNOWN_NULL_VALUE", "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE",
97+
"RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE", "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"},
98+
justification = "false positives for try-resource in java 11"
99+
)
95100
@Override public CpsFlowExecution create(FlowExecutionOwner owner, TaskListener listener, List<? extends Action> actions) throws Exception {
96101
for (Action a : actions) {
97102
if (a instanceof CpsFlowFactoryAction2) {

0 commit comments

Comments
 (0)