Issue 625: use (even) better primes for hashcodes

This commit is contained in:
Roel Spilker committed 2014-01-19 21:49:35 +01:00
1 parent 2ab6cc809d
commit 14cc545276
34 files changed
+82 -65

No files matched your search

@@ -23,7 +23,7 @@ final @lombok.Value class Value1 {
return true;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
final int PRIME = 277;
final int PRIME = 59;
int result = 1;
result = ((result * PRIME) + this.getX());
final java.lang.Object $name = this.getName();
@@ -68,7 +68,7 @@ final @lombok.Value class Value1 {
return (other instanceof Value2);
}
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
final int PRIME = 277;
final int PRIME = 59;
int result = 1;
result = ((result * PRIME) + this.getX());
final java.lang.Object $name = this.getName();
@@ -106,7 +106,7 @@ final @Value class Value3 {
return true;
}
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
final int PRIME = 277;
final int PRIME = 59;
int result = 1;
result = ((result * PRIME) + this.getX());
result = ((result * PRIME) + this.getY());