Skip to content
Browse files

[FIXED JENKINS-19017] - FileParameter - Handle non-null file paramete…

…rs as different values

The change prevents the issue when Jenkins merges builds with different files coming from one source (It may happen!).

Signed-off-by: Oleg Nenashev <>
(cherry picked from commit 7c4f6b7)
  • Loading branch information
oleg-nenashev authored and olivergondza committed Nov 7, 2014
1 parent b73bb3d commit fff888cc822f235dde8ebdd01152c626e85a12b2
Showing with 9 additions and 7 deletions.
  1. +9 −7 core/src/main/java/hudson/model/
@@ -162,7 +162,8 @@ public int hashCode() {

* In practice this will always be false, since location should be unique.
* Compares file parameters (existing files will be considered as different).
* Function has been modified in order to avoid <a href="">JENKINS-19017</a> issue (wrong merge of builds in the queue).
public boolean equals(Object obj) {
@@ -173,12 +174,13 @@ public boolean equals(Object obj) {
if (getClass() != obj.getClass())
return false;
FileParameterValue other = (FileParameterValue) obj;
if (location == null) {
if (other.location != null)
return false;
} else if (!location.equals(other.location))
return false;
return true;

if (location == null && other.location == null)
return true; // Consider null parameters as equal

//TODO: check fingerprints or checksums to improve the behavior
// Return false even if files are equal
return false;


0 comments on commit fff888c

Please sign in to comment.
You can’t perform that action at this time.