aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usage_examples/DataExample_post.jpage8
-rw-r--r--usage_examples/EqualsAndHashCodeExample_post.jpage6
2 files changed, 6 insertions, 8 deletions
diff --git a/usage_examples/DataExample_post.jpage b/usage_examples/DataExample_post.jpage
index a1fa038e..3dc675e9 100644
--- a/usage_examples/DataExample_post.jpage
+++ b/usage_examples/DataExample_post.jpage
@@ -44,9 +44,9 @@ public class DataExample {
@Override public boolean equals(Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof DataExample)) return false;
DataExample other = (DataExample) o;
+ if (!other.canEqual((Object)this)) return false;
if (this.getName() == null ? other.getName() != null : !this.getName().equals(other.getName())) return false;
if (this.getAge() != other.getAge()) return false;
if (Double.compare(this.getScore(), other.getScore()) != 0) return false;
@@ -92,9 +92,9 @@ public class DataExample {
@Override public boolean equals(Object o) {
if (o == this) return true;
- if (o == null) return false;
- if (o.getClass() != this.getClass()) return false;
+ if (!(o instanceof Exercise)) return false;
Exercise<?> other = (Exercise<?>) o;
+ if (!other.canEqual((Object)this)) return false;
if (this.getName() == null ? other.getValue() != null : !this.getName().equals(other.getName())) return false;
if (this.getValue() == null ? other.getValue() != null : !this.getValue().equals(other.getValue())) return false;
return true;
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;