mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 10:15:22 +00:00
The hashCode() method now generates a magic prime instead of 0 for the hash of null values; this reduces collisions.
This commit is contained in:
1 parent
23dcc9f5a5
commit
251fd03cd7
25 files changed
+49
-44
No files matched your search
@@ -34,9 +34,9 @@ class GetterLazyEahcToString {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
final java.lang.Object $value = this.getValue();
|
||||
result = result * PRIME + ($value == null ? 0 : $value.hashCode());
|
||||
result = result * PRIME + ($value == null ? 43 : $value.hashCode());
|
||||
final java.lang.Object $value2 = this.value2;
|
||||
result = result * PRIME + ($value2 == null ? 0 : $value2.hashCode());
|
||||
result = result * PRIME + ($value2 == null ? 43 : $value2.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user