diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-06-25 00:13:12 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-06-25 00:13:12 +0200 |
commit | 251fd03cd78ef6996d4252450bda596a5e8b11b9 (patch) | |
tree | 6cd9f4a8510ffabed01cd5eae60c0e1b6f2d2b35 /test/transform/resource/after-delombok/ValuePlain.java | |
parent | 23dcc9f5a5f3c24ccfb2f98ab556daed0dee3c89 (diff) | |
download | lombok-251fd03cd78ef6996d4252450bda596a5e8b11b9.tar.gz lombok-251fd03cd78ef6996d4252450bda596a5e8b11b9.tar.bz2 lombok-251fd03cd78ef6996d4252450bda596a5e8b11b9.zip |
The hashCode() method now generates a magic prime instead of 0 for the hash of null values; this reduces collisions.
Diffstat (limited to 'test/transform/resource/after-delombok/ValuePlain.java')
-rw-r--r-- | test/transform/resource/after-delombok/ValuePlain.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/transform/resource/after-delombok/ValuePlain.java b/test/transform/resource/after-delombok/ValuePlain.java index 09c301d2..8cc19c1e 100644 --- a/test/transform/resource/after-delombok/ValuePlain.java +++ b/test/transform/resource/after-delombok/ValuePlain.java @@ -39,7 +39,7 @@ final class Value1 { int result = 1; result = result * PRIME + this.getX(); final java.lang.Object $name = this.getName(); - result = result * PRIME + ($name == null ? 0 : $name.hashCode()); + result = result * PRIME + ($name == null ? 43 : $name.hashCode()); return result; } @java.lang.Override @@ -96,7 +96,7 @@ class Value2 { int result = 1; result = result * PRIME + this.getX(); final java.lang.Object $name = this.getName(); - result = result * PRIME + ($name == null ? 0 : $name.hashCode()); + result = result * PRIME + ($name == null ? 43 : $name.hashCode()); return result; } @java.lang.Override |