Skip to content

Commit

Permalink
Use spotbugs annotations instead of javax annotations
Browse files Browse the repository at this point in the history
The parent pom provides spotbugs reports by default.  Let's use spotbugs
annotations because they are used in other Jenkins plugins and in
Jenkins core.

See https://issues.jenkins.io/browse/JENKINS-55973 and
jenkinsci/jenkins#4604
  • Loading branch information
MarkEWaite committed Nov 24, 2021
1 parent 62f7043 commit e61d02e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import javax.annotation.CheckForNull;
import edu.umd.cs.findbugs.annotations.CheckForNull;

/**
* A {@link BranchBuildStrategy} that builds branches based on the results of all sub strategies matching.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import javax.annotation.CheckForNull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import javax.annotation.CheckForNull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import java.util.logging.Level;
import java.util.logging.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;

import hudson.util.LogTaskListener;
import jenkins.branch.BranchBuildStrategy;
Expand Down Expand Up @@ -249,7 +249,7 @@ public String toString() {
@Symbol("exact")
@Extension
public static class DescriptorImpl extends NameFilterDescriptor {
@Nonnull
@NonNull
@Override
public String getDisplayName() {
return Messages.NamedBranchBuildStrategyImpl_exactDisplayName();
Expand Down Expand Up @@ -323,7 +323,7 @@ public String toString() {
@Symbol("regex")
@Extension
public static class DescriptorImpl extends NameFilterDescriptor {
@Nonnull
@NonNull
@Override
public String getDisplayName() {
return Messages.NamedBranchBuildStrategyImpl_regexDisplayName();
Expand Down Expand Up @@ -462,7 +462,7 @@ private String getPattern(String names) {
@Symbol("wildcards")
@Extension
public static class DescriptorImpl extends NameFilterDescriptor {
@Nonnull
@NonNull
@Override
public String getDisplayName() {
return Messages.NamedBranchBuildStrategyImpl_wildcardDisplayName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import javax.annotation.CheckForNull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.DataBoundConstructor;

import javax.annotation.CheckForNull;
import edu.umd.cs.findbugs.annotations.CheckForNull;


@Restricted(NoExternalUse.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import hudson.model.TaskListener;
import java.io.IOException;
import java.util.Map;
import javax.annotation.Nonnull;
import jenkins.branch.MultiBranchProject;
import jenkins.branch.MultiBranchProjectFactory;
import jenkins.branch.MultiBranchProjectFactoryDescriptor;
Expand Down

0 comments on commit e61d02e

Please sign in to comment.