Skip to content

Commit

Permalink
EOL JSR 305
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Dec 31, 2021
1 parent dd1693c commit 63b28a6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/main/java/hudson/scm/SubversionChangeLogBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import jenkins.MasterToSlaveFileCallable;

/**
Expand Down Expand Up @@ -89,7 +89,7 @@ public SubversionChangeLogBuilder(AbstractBuild<?,?> build, BuildListener listen
/**
* @since 1.34
*/
public SubversionChangeLogBuilder(Run<?,?> build, FilePath workspace, @Nonnull SVNRevisionState baseline, EnvVars env, TaskListener listener, SubversionSCM scm) throws IOException {
public SubversionChangeLogBuilder(Run<?,?> build, FilePath workspace, @NonNull SVNRevisionState baseline, EnvVars env, TaskListener listener, SubversionSCM scm) throws IOException {
previousRevisions = baseline.revisions;
thisRevisions = scm.parseSvnRevisionFile(build);
this.listener = listener;
Expand All @@ -99,7 +99,7 @@ public SubversionChangeLogBuilder(Run<?,?> build, FilePath workspace, @Nonnull S
this.env = env;
}

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

TransformerHandler th = createTransformerHandler();
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/hudson/scm/SubversionSCM.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
import com.trilead.ssh2.SCPClient;
import com.trilead.ssh2.crypto.Base64;
import static java.util.stream.Collectors.toList;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import jenkins.MasterToSlaveFileCallable;
import jenkins.security.Roles;
import jenkins.security.SlaveToMasterCallable;
Expand Down Expand Up @@ -2237,7 +2237,7 @@ public boolean isBrowserReusable(SubversionSCM x, SubversionSCM y) {
return true;
}

@Nonnull
@NonNull
@Override
public Permission getRequiredGlobalConfigPagePermission() {
return Jenkins.MANAGE;
Expand Down Expand Up @@ -2924,7 +2924,7 @@ public SVNURL getRepositoryRoot(AbstractProject context) throws SVNException {
return getRepositoryRoot(context, context.getScm());
}

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

// Ignore validation if repository URL is empty
String url = Util.fixEmptyAndTrim(remote);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/hudson/scm/SvnExternalsFileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;

/**
* Implements local file storage of externals information.
Expand All @@ -61,7 +61,7 @@ class SvnExternalsFileManager {
* @param project Project to be used
* @return A lock object (will be created on-demand)
*/
@Nonnull
@NonNull
private static synchronized Object getFileLockItem(Job project) {
if (projectExternalsCache == null) {
projectExternalsCache = new WeakHashMap<>();
Expand All @@ -78,7 +78,7 @@ private static synchronized Object getFileLockItem(Job project) {
/**
* Gets the file that stores the externals.
*/
@Nonnull
@NonNull
private static File getExternalsFile(Job project) {
return new File(project.getRootDir(), SVN_EXTERNALS_FILE);
}
Expand All @@ -93,7 +93,7 @@ private static File getExternalsFile(Job project) {
*
* @return immutable list. Can be empty but never null.
*/
@Nonnull
@NonNull
@SuppressWarnings("unchecked")
public static List<SubversionSCM.External> parseExternalsFile(Job project) throws IOException {
File file = getExternalsFile(project);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.util.ListBoxModel;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
Expand Down Expand Up @@ -182,7 +182,7 @@ public DescriptorImpl getDescriptor() {
* <p>This method never returns {@code null}. In case an error happens, the
* returned list contains an error message prefixed by {@code !}.</p>
*/
@Nonnull public List<String> getTags(@Nullable Job context) {
@NonNull public List<String> getTags(@Nullable Job context) {
List<String> dirs = new ArrayList<>();

SVNRepository repo = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.List;
import java.util.regex.Pattern;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;

import org.tmatesoft.svn.core.ISVNDirEntryHandler;
import org.tmatesoft.svn.core.SVNDirEntry;
Expand Down Expand Up @@ -61,7 +61,7 @@ public List<String> getDirs() {
return getDirs(false, false);
}

public @Nonnull List<String> getDirs(boolean reverseByDate, boolean reverseByName) {
public @NonNull List<String> getDirs(boolean reverseByDate, boolean reverseByName) {
if (reverseByDate) {
dirs.sort(Comparator.comparing(SVNDirEntry::getDate).reversed());
} else if(reverseByName) {
Expand Down

0 comments on commit 63b28a6

Please sign in to comment.