diff options
Diffstat (limited to 'usage_examples/EqualsAndHashCodeExample_post.jpage')
-rw-r--r-- | usage_examples/EqualsAndHashCodeExample_post.jpage | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usage_examples/EqualsAndHashCodeExample_post.jpage b/usage_examples/EqualsAndHashCodeExample_post.jpage index f58e045b..91e78250 100644 --- a/usage_examples/EqualsAndHashCodeExample_post.jpage +++ b/usage_examples/EqualsAndHashCodeExample_post.jpage @@ -27,7 +27,7 @@ public class EqualsAndHashCodeExample { final int PRIME = 59; int result = 1; final long temp1 = Double.doubleToLongBits(this.score); - result = (result*PRIME) + (this.name == null ? 0 : this.name.hashCode()); + result = (result*PRIME) + (this.name == null ? 43 : this.name.hashCode()); result = (result*PRIME) + (int)(temp1 ^ (temp1 >>> 32)); result = (result*PRIME) + Arrays.deepHashCode(this.tags); return result; |