Skip to content
Permalink
Browse files
[FIXED JENKINS-18389] beware autoboxing
And don't rely on int pool even to compare to 0
  • Loading branch information
ndeloof committed Jun 19, 2013
1 parent 2738f16 commit 320451907db64479ec058b62728de943fabd06be
Showing 1 changed file with 3 additions and 3 deletions.
@@ -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);
}

0 comments on commit 3204519

Please sign in to comment.