Skip to content

Commit

Permalink
Suppress SE_INNER_CLASS SpotBugs violations (jenkinsci#6121)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Dec 28, 2021
1 parent 1e96f8a commit f173994
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/util/ProcessTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ public String call() throws IOException {
/**
* Serialized form of {@link OSProcess} is the PID and {@link ProcessTree}
*/
@SuppressFBWarnings(value = "SE_INNER_CLASS", justification = "Serializing the outer instance is intended")
private final class SerializedProcess implements Serializable {
private final int pid;
private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -2177,6 +2178,7 @@ Object writeReplace() {

private static final long serialVersionUID = 1L;

@SuppressFBWarnings(value = "SE_INNER_CLASS", justification = "Serializing the outer instance is intended")
private class RemoteProcess extends OSProcess implements Serializable {
private final IOSProcess proxy;

Expand Down
7 changes: 0 additions & 7 deletions src/spotbugs/spotbugs-excludes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,6 @@
<Bug pattern="SE_BAD_FIELD"/>
<Class name="hudson.scm.PollingResult"/>
</And>
<And>
<Bug pattern="SE_INNER_CLASS"/>
<Or>
<Class name="hudson.util.ProcessTree$Remote$RemoteProcess"/>
<Class name="hudson.util.ProcessTree$SerializedProcess"/>
</Or>
</And>
<And>
<Bug pattern="STATIC_IV"/>
<Or>
Expand Down

0 comments on commit f173994

Please sign in to comment.