aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/DataPlain.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-06-25 00:13:12 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-06-25 00:13:12 +0200
commit251fd03cd78ef6996d4252450bda596a5e8b11b9 (patch)
tree6cd9f4a8510ffabed01cd5eae60c0e1b6f2d2b35 /test/transform/resource/after-delombok/DataPlain.java
parent23dcc9f5a5f3c24ccfb2f98ab556daed0dee3c89 (diff)
downloadlombok-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/DataPlain.java')
-rw-r--r--test/transform/resource/after-delombok/DataPlain.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/transform/resource/after-delombok/DataPlain.java b/test/transform/resource/after-delombok/DataPlain.java
index 4ddb9414..cfb72656 100644
--- a/test/transform/resource/after-delombok/DataPlain.java
+++ b/test/transform/resource/after-delombok/DataPlain.java
@@ -49,7 +49,7 @@ class Data1 {
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
@@ -110,7 +110,7 @@ class Data2 {
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
@@ -165,7 +165,7 @@ final class Data3 {
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