Skip to content

Commit

Permalink
[FIXED JENKINS-18389] beware autoboxing
Browse files Browse the repository at this point in the history
And don't rely on int pool even to compare to 0
  • Loading branch information
ndeloof committed Jun 19, 2013
1 parent 2738f16 commit 3204519
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -156,19 +156,19 @@ private boolean checkIfModifiedJob(BuildResultTriggerInfo configuredTriggerJobIn
}

Integer newLastBuildNumber = newContextResults.get(jobName);
if (newLastBuildNumber == null || newLastBuildNumber == 0) {
if (newLastBuildNumber == null || newLastBuildNumber.intValue() == 0) {
log.info(String.format("The job %s doesn't have any new builds.", jobName));
return false;
}


Integer oldLastBuildNumber = oldContextResults.get(jobName);
if (oldLastBuildNumber == null || oldLastBuildNumber == 0) {
if (oldLastBuildNumber == null || oldLastBuildNumber.intValue() == 0) {
return isMatchingExpectedResults(configuredTriggerJobInfo, log);
}

//Process if there is a new build between now and previous polling
if (newLastBuildNumber == 0 || newLastBuildNumber != oldLastBuildNumber) {
if (newLastBuildNumber.intValue() == 0 || newLastBuildNumber.intValue() != oldLastBuildNumber.intValue()) {
return isMatchingExpectedResults(configuredTriggerJobInfo, log);
}

Expand Down

0 comments on commit 3204519

Please sign in to comment.