|
24 | 24 | import java.util.LinkedHashMap; |
25 | 25 | import java.util.LinkedHashSet; |
26 | 26 | import java.util.Map; |
| 27 | +import java.util.Objects; |
27 | 28 | import java.util.Set; |
28 | 29 | import java.util.function.Consumer; |
29 | 30 | import java.util.function.Function; |
@@ -198,59 +199,23 @@ public boolean equals(Object obj) { |
198 | 199 | } |
199 | 200 | OAuth2AuthorizationRequest that = (OAuth2AuthorizationRequest) obj; |
200 | 201 |
|
201 | | - if (!this.authorizationUri.equals(that.authorizationUri)) { |
202 | | - return false; |
203 | | - } |
204 | | - |
205 | | - if (!this.authorizationGrantType.equals(that.authorizationGrantType)) { |
206 | | - return false; |
207 | | - } |
208 | | - |
209 | | - if (this.responseType != that.responseType) { |
210 | | - return false; |
211 | | - } |
212 | | - |
213 | | - if (!this.clientId.equals(that.clientId)) { |
214 | | - return false; |
215 | | - } |
216 | | - |
217 | | - if (!this.redirectUri.equals(that.redirectUri)) { |
218 | | - return false; |
219 | | - } |
220 | | - |
221 | | - if (!this.scopes.equals(that.scopes)) { |
222 | | - return false; |
223 | | - } |
224 | | - |
225 | | - if (!this.state.equals(that.state)) { |
226 | | - return false; |
227 | | - } |
228 | | - |
229 | | - if (!this.additionalParameters.equals(that.additionalParameters)) { |
230 | | - return false; |
231 | | - } |
232 | | - |
233 | | - if (!this.authorizationRequestUri.equals(that.authorizationRequestUri)) { |
234 | | - return false; |
235 | | - } |
236 | | - |
237 | | - return this.attributes.equals(that.attributes); |
| 202 | + return Objects.equals(this.authorizationUri, that.authorizationUri) |
| 203 | + && Objects.equals(this.authorizationGrantType, that.authorizationGrantType) |
| 204 | + && Objects.equals(this.responseType, that.responseType) && Objects.equals(this.clientId, that.clientId) |
| 205 | + && Objects.equals(this.redirectUri, that.redirectUri) && Objects.equals(this.scopes, that.scopes) |
| 206 | + && Objects.equals(this.state, that.state) |
| 207 | + && Objects.equals(this.additionalParameters, that.additionalParameters) |
| 208 | + && Objects.equals(this.authorizationRequestUri, that.authorizationRequestUri) |
| 209 | + && Objects.equals(this.attributes, that.attributes); |
238 | 210 | } |
239 | 211 |
|
240 | 212 | @Override |
241 | 213 | public int hashCode() { |
242 | | - int result = this.authorizationUri.hashCode(); |
243 | | - result = 31 * result + this.clientId.hashCode(); |
244 | | - result = 31 * result + ((this.authorizationGrantType == null) ? 0 : this.authorizationGrantType.hashCode()); |
245 | | - result = 31 * result + ((this.responseType == null) ? 0 : this.responseType.hashCode()); |
246 | | - result = 31 * result + ((this.redirectUri == null) ? 0 : this.redirectUri.hashCode()); |
247 | | - result = 31 * result + ((this.scopes == null) ? 0 : this.scopes.hashCode()); |
248 | | - result = 31 * result + ((this.state == null) ? 0 : this.state.hashCode()); |
249 | | - result = 31 * result + ((this.additionalParameters == null) ? 0 : this.additionalParameters.hashCode()); |
250 | | - result = 31 * result + ((this.authorizationRequestUri == null) ? 0 : this.authorizationRequestUri.hashCode()); |
251 | | - result = 31 * result + ((this.attributes == null) ? 0 : this.attributes.hashCode()); |
252 | | - |
253 | | - return result; |
| 214 | + return Objects.hashCode(this.authorizationUri) + Objects.hashCode(this.clientId) |
| 215 | + + Objects.hashCode(this.authorizationGrantType) + Objects.hashCode(this.responseType) |
| 216 | + + Objects.hashCode(this.redirectUri) + Objects.hashCode(this.scopes) + Objects.hashCode(this.state) |
| 217 | + + Objects.hashCode(this.additionalParameters) + Objects.hashCode(this.authorizationRequestUri) |
| 218 | + + Objects.hashCode(this.attributes); |
254 | 219 | } |
255 | 220 |
|
256 | 221 | /** |
|
0 commit comments