File tree Expand file tree Collapse file tree 1 file changed +18
-11
lines changed
jenkins-client/src/main/java/com/offbytwo/jenkins/model Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -107,26 +107,33 @@ private void stopPost() throws HttpResponseException, IOException {
107
107
}
108
108
109
109
@ Override
110
- public boolean equals (Object o ) {
111
- if (this == o )
110
+ public boolean equals (Object obj ) {
111
+ if (this == obj )
112
112
return true ;
113
- if (o == null || getClass () != o . getClass () )
113
+ if (obj == null )
114
114
return false ;
115
-
116
- Build build = (Build ) o ;
117
-
118
- if (number != build .number )
115
+ if (getClass () != obj .getClass ())
119
116
return false ;
120
- if (url != null ? !url .equals (build .url ) : build .url != null )
117
+ Build other = (Build ) obj ;
118
+ if (number != other .number )
119
+ return false ;
120
+ if (queueId != other .queueId )
121
+ return false ;
122
+ if (url == null ) {
123
+ if (other .url != null )
124
+ return false ;
125
+ } else if (!url .equals (other .url ))
121
126
return false ;
122
-
123
127
return true ;
124
128
}
125
129
126
130
@ Override
127
131
public int hashCode () {
128
- int result = number ;
129
- result = 31 * result + (url != null ? url .hashCode () : 0 );
132
+ final int prime = 31 ;
133
+ int result = 1 ;
134
+ result = prime * result + number ;
135
+ result = prime * result + queueId ;
136
+ result = prime * result + ((url == null ) ? 0 : url .hashCode ());
130
137
return result ;
131
138
}
132
139
}
You can’t perform that action at this time.
0 commit comments