-
Bug
-
Resolution: Fixed
-
Blocker
-
None
The build result trigger constantly triggers jobs when the build number is not low.
Issue caused by comparing two Integer objects with == rather than equals()
patch inline
diff --git a/src/main/java/org/jenkinsci/plugins/buildresulttrigger/BuildResultTrigger.java b/src/mai index c6946e3..192947f 100644 --- a/src/main/java/org/jenkinsci/plugins/buildresulttrigger/BuildResultTrigger.java +++ b/src/main/java/org/jenkinsci/plugins/buildresulttrigger/BuildResultTrigger.java @@ -168,7 +168,7 @@ public class BuildResultTrigger extends AbstractTriggerByFullContext<BuildResult } //Process if there is a new build between now and previous polling - if (newLastBuildNumber == 0 || newLastBuildNumber != oldLastBuildNumber) { + if (newLastBuildNumber == 0 || ! newLastBuildNumber.equals(oldLastBuildNumber)) { return isMatchingExpectedResults(configuredTriggerJobInfo, log); }