diff options
Diffstat (limited to 'usage_examples/EqualsAndHashCodeExample_post.jpage')
-rw-r--r-- | usage_examples/EqualsAndHashCodeExample_post.jpage | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usage_examples/EqualsAndHashCodeExample_post.jpage b/usage_examples/EqualsAndHashCodeExample_post.jpage index 189a520e..4a90e7dc 100644 --- a/usage_examples/EqualsAndHashCodeExample_post.jpage +++ b/usage_examples/EqualsAndHashCodeExample_post.jpage @@ -14,10 +14,9 @@ public class EqualsAndHashCodeExample { @Override public boolean equals(Object o) { if (o == this) return true; - if (o == null) return false; if (!(o instanceof EqualsAndHashCodeExample)) return false; EqualsAndHashCodeExample other = (EqualsAndHashCodeExample) o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((Object)this)) return false; if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false; if (Double.compare(this.score, other.score) != 0) return false; if (!Arrays.deepEquals(this.tags, other.tags)) return false; @@ -48,10 +47,9 @@ public class EqualsAndHashCodeExample { @Override public boolean equals(Object o) { if (o == this) return true; - if (o == null) return false; if (!(o instanceof Square)) return false; Square other = (Square) o; - if (!other.canEqual(this)) return false; + if (!other.canEqual((Object)this)) return false; if (!super.equals(o)) return false; if (this.width != other.width) return false; if (this.height != other.height) return false; |