aboutsummaryrefslogtreecommitdiff
path: root/usage_examples/EqualsAndHashCodeExample_post.jpage
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2014-01-19 21:49:35 +0100
committerRoel Spilker <r.spilker@gmail.com>2014-01-19 21:49:35 +0100
commit14cc54527663018cdf7343eefffc8c37fbce93bb (patch)
treeb8b45da7feb1217c31306f7024af37ea287d2b2e /usage_examples/EqualsAndHashCodeExample_post.jpage
parent2ab6cc809d6aec8d253962547cab7e32598b84a7 (diff)
downloadlombok-14cc54527663018cdf7343eefffc8c37fbce93bb.tar.gz
lombok-14cc54527663018cdf7343eefffc8c37fbce93bb.tar.bz2
lombok-14cc54527663018cdf7343eefffc8c37fbce93bb.zip
Issue 625: use (even) better primes for hashcodes
Diffstat (limited to 'usage_examples/EqualsAndHashCodeExample_post.jpage')
-rw-r--r--usage_examples/EqualsAndHashCodeExample_post.jpage4
1 files changed, 2 insertions, 2 deletions
diff --git a/usage_examples/EqualsAndHashCodeExample_post.jpage b/usage_examples/EqualsAndHashCodeExample_post.jpage
index 57191f55..aa6a44ba 100644
--- a/usage_examples/EqualsAndHashCodeExample_post.jpage
+++ b/usage_examples/EqualsAndHashCodeExample_post.jpage
@@ -24,7 +24,7 @@ public class EqualsAndHashCodeExample {
}
@Override public int hashCode() {
- final int PRIME = 277;
+ final int PRIME = 59;
int result = 1;
final long temp1 = Double.doubleToLongBits(this.score);
result = (result*PRIME) + (this.name == null ? 0 : this.name.hashCode());
@@ -57,7 +57,7 @@ public class EqualsAndHashCodeExample {
}
@Override public int hashCode() {
- final int PRIME = 277;
+ final int PRIME = 59;
int result = 1;
result = (result*PRIME) + super.hashCode();
result = (result*PRIME) + this.width;