File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
org.springframework.context/src/main/java/org/springframework/validation Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2010 the original author or authors.
2
+ * Copyright 2002-2011 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
28
28
29
29
import org .springframework .beans .PropertyEditorRegistry ;
30
30
import org .springframework .util .Assert ;
31
+ import org .springframework .util .ObjectUtils ;
31
32
import org .springframework .util .StringUtils ;
32
33
33
34
/**
@@ -337,13 +338,13 @@ public boolean equals(Object other) {
337
338
}
338
339
BindingResult otherResult = (BindingResult ) other ;
339
340
return (getObjectName ().equals (otherResult .getObjectName ()) &&
340
- getTarget (). equals ( otherResult .getTarget ()) &&
341
+ ObjectUtils . nullSafeEquals ( getTarget (), otherResult .getTarget ()) &&
341
342
getAllErrors ().equals (otherResult .getAllErrors ()));
342
343
}
343
344
344
345
@ Override
345
346
public int hashCode () {
346
- return getObjectName ().hashCode () * 29 + getTarget (). hashCode () ;
347
+ return getObjectName ().hashCode ();
347
348
}
348
349
349
350
You can’t perform that action at this time.
0 commit comments