From 251fd03cd78ef6996d4252450bda596a5e8b11b9 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 25 Jun 2015 00:13:12 +0200 Subject: The hashCode() method now generates a magic prime instead of 0 for the hash of null values; this reduces collisions. --- test/transform/resource/after-delombok/DataPlain.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/transform/resource/after-delombok/DataPlain.java') 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 -- cgit