aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj/EqualsAndHashCodeRank.java
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2020-06-18 22:08:25 +0200
committerRoel Spilker <r.spilker@gmail.com>2020-06-18 22:08:25 +0200
commit39d2c280fbaced63f5697481af6b37ab81891798 (patch)
tree148dd9e4b3798e78b59105b2a5535b396c723aec /test/transform/resource/after-ecj/EqualsAndHashCodeRank.java
parentc4db4e124c5081602802f88b7ebe564c8af3aac8 (diff)
downloadlombok-39d2c280fbaced63f5697481af6b37ab81891798.tar.gz
lombok-39d2c280fbaced63f5697481af6b37ab81891798.tar.bz2
lombok-39d2c280fbaced63f5697481af6b37ab81891798.zip
Fixes #1543: in equals, by default first compare the primitives
Diffstat (limited to 'test/transform/resource/after-ecj/EqualsAndHashCodeRank.java')
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCodeRank.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeRank.java b/test/transform/resource/after-ecj/EqualsAndHashCodeRank.java
index 1ea899a8..ef221261 100644
--- a/test/transform/resource/after-ecj/EqualsAndHashCodeRank.java
+++ b/test/transform/resource/after-ecj/EqualsAndHashCodeRank.java
@@ -7,18 +7,18 @@ public @EqualsAndHashCode class EqualsAndHashCodeRank {
super();
}
public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) {
- if (o == this)
+ if ((o == this))
return true;
- if (!(o instanceof EqualsAndHashCodeRank))
+ if ((! (o instanceof EqualsAndHashCodeRank)))
return false;
final EqualsAndHashCodeRank other = (EqualsAndHashCodeRank) o;
- if (!other.canEqual((java.lang.Object) this))
+ if ((! other.canEqual((java.lang.Object) this)))
return false;
- if (this.b != other.b)
+ if ((this.a != other.a))
return false;
- if (this.a != other.a)
+ if ((this.c != other.c))
return false;
- if (this.c != other.c)
+ if ((this.b != other.b))
return false;
return true;
}
@@ -28,9 +28,9 @@ public @EqualsAndHashCode class EqualsAndHashCodeRank {
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
final int PRIME = 59;
int result = 1;
- result = result * PRIME + this.b;
- result = result * PRIME + this.a;
- result = result * PRIME + this.c;
+ result = ((result * PRIME) + this.a);
+ result = ((result * PRIME) + this.c);
+ result = ((result * PRIME) + this.b);
return result;
}
}