From a40a86ad532881acd311200a665b5f55790c55cc Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 9 Jan 2014 21:00:44 +0100 Subject: [#625] Instead of '31' as a prime number for hashCode(), use something else. 31, probably owing to its inclusion in Effective Java, is overused, as proven by Maaartinus in issue 625. Switching to 277 instead. Also, 1231/1237 pair used for booleans has been replaced by 2591/2609. --- test/transform/resource/after-delombok/GetterLazyBoolean.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/transform/resource/after-delombok/GetterLazyBoolean.java') diff --git a/test/transform/resource/after-delombok/GetterLazyBoolean.java b/test/transform/resource/after-delombok/GetterLazyBoolean.java index 08d32013..21b153c9 100644 --- a/test/transform/resource/after-delombok/GetterLazyBoolean.java +++ b/test/transform/resource/after-delombok/GetterLazyBoolean.java @@ -21,9 +21,9 @@ class GetterLazyBoolean { @java.lang.Override @java.lang.SuppressWarnings("all") public int hashCode() { - final int PRIME = 31; + final int PRIME = 277; int result = 1; - result = result * PRIME + (this.isBooleanValue() ? 1231 : 1237); + result = result * PRIME + (this.isBooleanValue() ? 2591 : 2609); return result; } @java.lang.Override -- cgit