Skip to content

Commit 8537eb1

Browse files
authored
Summary: Use spotbugs 4.8.2 with more exclusions (#507)
Prep for * jenkinsci/pom#510 Part of the checklist in: * jenkinsci/jenkins#8803
1 parent 063b3dd commit 8537eb1

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

core/src/main/java/org/kohsuke/stapler/TokenList.java

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
package org.kohsuke.stapler;
2525

26+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2627
import java.util.StringTokenizer;
2728
import java.io.ByteArrayOutputStream;
2829
import java.nio.charset.StandardCharsets;
@@ -46,6 +47,7 @@ public final class TokenList {
4647
/**
4748
* Index of the next token.
4849
*/
50+
@SuppressFBWarnings(value="PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification="Preserve API compatibility")
4951
public int idx;
5052

5153
/**

core/src/main/java/org/kohsuke/stapler/export/ExportConfig.java

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.kohsuke.stapler.export;
22

3+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4+
35
/**
46
* Controls the output behaviour.
57
*
@@ -11,6 +13,7 @@ public class ExportConfig {
1113
* Use getter and setter
1214
*/
1315
@Deprecated
16+
@SuppressFBWarnings(value="PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification="Preserve API compatibility")
1417
public boolean prettyPrint;
1518

1619
private ClassAttributeBehaviour classAttribute = ClassAttributeBehaviour.IF_NEEDED;

pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
<scmTag>HEAD</scmTag>
4747
<jetty.version>10.0.18</jetty.version>
4848
<gitHubRepo>jenkinsci/stapler</gitHubRepo>
49+
<!-- TODO: Remove when parent pom is using this version or newer -->
50+
<!-- https://github.com/jenkinsci/pom/pull/510 -->
51+
<spotbugs-maven-plugin.version>4.8.2.0</spotbugs-maven-plugin.version>
52+
<spotbugs.omitVisitors>FindReturnRef,ConstructorThrow</spotbugs.omitVisitors>
4953
</properties>
5054

5155
<dependencyManagement>

0 commit comments

Comments
 (0)