Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #123 from christ66/findbugs-1
[JENKINS-29492] Fix some findbugs issues
  • Loading branch information
christ66 committed Aug 12, 2015
2 parents 8e1e0ae + 902b28d commit 0c52b54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/main/java/hudson/scm/RevisionParameterAction.java
Expand Up @@ -110,10 +110,10 @@ private void mergeRevisions(List<SvnInfo> newRevisions) {

@Override
public String toString() {
String result = "[RevisionParameterAction ";
StringBuilder result = new StringBuilder("[RevisionParameterAction ");
for(SvnInfo i : revisions) {
result += i.url + "(" + i.revision + ") ";
result.append(i.url).append("(").append(i.revision).append(") ");
}
return result + "]";
return result.append("]").toString();
}
}
10 changes: 6 additions & 4 deletions src/main/java/hudson/scm/SubversionChangeLogBuilder.java
Expand Up @@ -171,15 +171,15 @@ private boolean buildModule(PathContext context, SVNLogClient svnlc, DirAwareSVN

// handle case where previous workspace revision is newer than this revision
if (prevRev.compareTo(thisRev) > 0) {
long temp = thisRev.longValue();
thisRev = new Long(prevRev.longValue());
prevRev = new Long(temp);
long temp = thisRev;
thisRev = prevRev;
prevRev = temp;
}

logHandler.setContext(context);
try {
if(debug)
listener.getLogger().printf("Computing changelog of %1s from %2s to %3s\n",
listener.getLogger().printf("Computing changelog of %1s from %2s to %3s%n",
SVNURL.parseURIEncoded(url), prevRev+1, thisRev);
svnlc.doLog(SVNURL.parseURIEncoded(url),
null,
Expand Down Expand Up @@ -227,6 +227,8 @@ private static TransformerHandler createTransformerHandler() {

private static final LocatorImpl DUMMY_LOCATOR = new LocatorImpl();

@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "MS_SHOULD_BE_FINAL",
justification = "Debugging environment variable is made editable, so it can be modified through the groovy console.")
public static boolean debug = false;

static {
Expand Down

0 comments on commit 0c52b54

Please sign in to comment.