Skip to content

Commit 63b28a6

Browse files
committed
EOL JSR 305
1 parent dd1693c commit 63b28a6

5 files changed

+16
-16
lines changed

src/main/java/hudson/scm/SubversionChangeLogBuilder.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
import java.io.Serializable;
5656
import java.util.List;
5757
import java.util.Map;
58-
import javax.annotation.Nonnull;
58+
import edu.umd.cs.findbugs.annotations.NonNull;
5959
import jenkins.MasterToSlaveFileCallable;
6060

6161
/**
@@ -89,7 +89,7 @@ public SubversionChangeLogBuilder(AbstractBuild<?,?> build, BuildListener listen
8989
/**
9090
* @since 1.34
9191
*/
92-
public SubversionChangeLogBuilder(Run<?,?> build, FilePath workspace, @Nonnull SVNRevisionState baseline, EnvVars env, TaskListener listener, SubversionSCM scm) throws IOException {
92+
public SubversionChangeLogBuilder(Run<?,?> build, FilePath workspace, @NonNull SVNRevisionState baseline, EnvVars env, TaskListener listener, SubversionSCM scm) throws IOException {
9393
previousRevisions = baseline.revisions;
9494
thisRevisions = scm.parseSvnRevisionFile(build);
9595
this.listener = listener;
@@ -99,7 +99,7 @@ public SubversionChangeLogBuilder(Run<?,?> build, FilePath workspace, @Nonnull S
9999
this.env = env;
100100
}
101101

102-
public boolean run(@Nonnull Map<String, List<SubversionSCM.External>> externalsMap, Result changeLog) throws IOException, InterruptedException {
102+
public boolean run(@NonNull Map<String, List<SubversionSCM.External>> externalsMap, Result changeLog) throws IOException, InterruptedException {
103103
boolean changelogFileCreated = false;
104104

105105
TransformerHandler th = createTransformerHandler();

src/main/java/hudson/scm/SubversionSCM.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
import com.trilead.ssh2.SCPClient;
192192
import com.trilead.ssh2.crypto.Base64;
193193
import static java.util.stream.Collectors.toList;
194-
import javax.annotation.Nonnull;
194+
import edu.umd.cs.findbugs.annotations.NonNull;
195195
import jenkins.MasterToSlaveFileCallable;
196196
import jenkins.security.Roles;
197197
import jenkins.security.SlaveToMasterCallable;
@@ -2237,7 +2237,7 @@ public boolean isBrowserReusable(SubversionSCM x, SubversionSCM y) {
22372237
return true;
22382238
}
22392239

2240-
@Nonnull
2240+
@NonNull
22412241
@Override
22422242
public Permission getRequiredGlobalConfigPagePermission() {
22432243
return Jenkins.MANAGE;
@@ -2924,7 +2924,7 @@ public SVNURL getRepositoryRoot(AbstractProject context) throws SVNException {
29242924
return getRepositoryRoot(context, context.getScm());
29252925
}
29262926

2927-
public @Nonnull SVNURL getRepositoryRoot(Job context, SCM scm) throws SVNException {
2927+
public @NonNull SVNURL getRepositoryRoot(Job context, SCM scm) throws SVNException {
29282928
getUUID(context, scm);
29292929
return repositoryRoot;
29302930
}
@@ -3233,7 +3233,7 @@ public FormValidation doCheckCredentialsId(StaplerRequest req, @AncestorInPath I
32333233
/**
32343234
* Validate the value for a remote (repository) location.
32353235
*/
3236-
public FormValidation checkCredentialsId(/* TODO unused, delete */StaplerRequest req, @Nonnull Item context, String remote, String value) {
3236+
public FormValidation checkCredentialsId(/* TODO unused, delete */StaplerRequest req, @NonNull Item context, String remote, String value) {
32373237

32383238
// Ignore validation if repository URL is empty
32393239
String url = Util.fixEmptyAndTrim(remote);

src/main/java/hudson/scm/SvnExternalsFileManager.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
import java.util.List;
3838
import java.util.Map;
3939
import java.util.WeakHashMap;
40-
import javax.annotation.Nonnull;
40+
import edu.umd.cs.findbugs.annotations.NonNull;
4141

4242
/**
4343
* Implements local file storage of externals information.
@@ -61,7 +61,7 @@ class SvnExternalsFileManager {
6161
* @param project Project to be used
6262
* @return A lock object (will be created on-demand)
6363
*/
64-
@Nonnull
64+
@NonNull
6565
private static synchronized Object getFileLockItem(Job project) {
6666
if (projectExternalsCache == null) {
6767
projectExternalsCache = new WeakHashMap<>();
@@ -78,7 +78,7 @@ private static synchronized Object getFileLockItem(Job project) {
7878
/**
7979
* Gets the file that stores the externals.
8080
*/
81-
@Nonnull
81+
@NonNull
8282
private static File getExternalsFile(Job project) {
8383
return new File(project.getRootDir(), SVN_EXTERNALS_FILE);
8484
}
@@ -93,7 +93,7 @@ private static File getExternalsFile(Job project) {
9393
*
9494
* @return immutable list. Can be empty but never null.
9595
*/
96-
@Nonnull
96+
@NonNull
9797
@SuppressWarnings("unchecked")
9898
public static List<SubversionSCM.External> parseExternalsFile(Job project) throws IOException {
9999
File file = getExternalsFile(project);

src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
import java.util.logging.Logger;
5151
import java.util.regex.Pattern;
5252
import java.util.regex.PatternSyntaxException;
53-
import javax.annotation.Nonnull;
54-
import javax.annotation.Nullable;
53+
import edu.umd.cs.findbugs.annotations.NonNull;
54+
import edu.umd.cs.findbugs.annotations.Nullable;
5555
import hudson.util.ListBoxModel;
5656
import jenkins.model.Jenkins;
5757
import net.sf.json.JSONObject;
@@ -182,7 +182,7 @@ public DescriptorImpl getDescriptor() {
182182
* <p>This method never returns {@code null}. In case an error happens, the
183183
* returned list contains an error message prefixed by {@code !}.</p>
184184
*/
185-
@Nonnull public List<String> getTags(@Nullable Job context) {
185+
@NonNull public List<String> getTags(@Nullable Job context) {
186186
List<String> dirs = new ArrayList<>();
187187

188188
SVNRepository repo = null;

src/main/java/hudson/scm/listtagsparameter/SimpleSVNDirEntryHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import java.util.List;
3333
import java.util.regex.Pattern;
3434

35-
import javax.annotation.Nonnull;
35+
import edu.umd.cs.findbugs.annotations.NonNull;
3636

3737
import org.tmatesoft.svn.core.ISVNDirEntryHandler;
3838
import org.tmatesoft.svn.core.SVNDirEntry;
@@ -61,7 +61,7 @@ public List<String> getDirs() {
6161
return getDirs(false, false);
6262
}
6363

64-
public @Nonnull List<String> getDirs(boolean reverseByDate, boolean reverseByName) {
64+
public @NonNull List<String> getDirs(boolean reverseByDate, boolean reverseByName) {
6565
if (reverseByDate) {
6666
dirs.sort(Comparator.comparing(SVNDirEntry::getDate).reversed());
6767
} else if(reverseByName) {

0 commit comments

Comments
 (0)