diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-01-09 21:00:44 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-01-09 21:24:04 +0100 |
commit | a40a86ad532881acd311200a665b5f55790c55cc (patch) | |
tree | 653880e9aa8078c42a86cf0a7a184bd040e87308 /test/transform/resource/after-delombok/ValuePlain.java | |
parent | 685ddfd52ebba4ca85ff93e08de14f38ecd8714b (diff) | |
download | lombok-a40a86ad532881acd311200a665b5f55790c55cc.tar.gz lombok-a40a86ad532881acd311200a665b5f55790c55cc.tar.bz2 lombok-a40a86ad532881acd311200a665b5f55790c55cc.zip |
[#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.
Diffstat (limited to 'test/transform/resource/after-delombok/ValuePlain.java')
-rw-r--r-- | test/transform/resource/after-delombok/ValuePlain.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/transform/resource/after-delombok/ValuePlain.java b/test/transform/resource/after-delombok/ValuePlain.java index d1cfa3d7..af87d1ba 100644 --- a/test/transform/resource/after-delombok/ValuePlain.java +++ b/test/transform/resource/after-delombok/ValuePlain.java @@ -30,7 +30,7 @@ final class Value1 { @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.getX(); final java.lang.Object $name = this.getName(); @@ -80,7 +80,7 @@ class Value2 { @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.getX(); final java.lang.Object $name = this.getName(); @@ -123,7 +123,7 @@ final class Value3 { @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.getX(); result = result * PRIME + this.getY(); |