mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 14:13:32 +00:00
Fixes #1543: in equals, by default first compare the primitives
This commit is contained in:
1 parent
c4db4e124c
commit
39d2c280fb
14 files changed
+74
-41
No files matched your search
@@ -9,9 +9,9 @@ public class EqualsAndHashCodeRank {
|
||||
if (!(o instanceof EqualsAndHashCodeRank)) return false;
|
||||
final EqualsAndHashCodeRank other = (EqualsAndHashCodeRank) o;
|
||||
if (!other.canEqual((java.lang.Object) this)) return false;
|
||||
if (this.b != other.b) return false;
|
||||
if (this.a != other.a) return false;
|
||||
if (this.c != other.c) return false;
|
||||
if (this.b != other.b) return false;
|
||||
return true;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@@ -23,9 +23,9 @@ public class EqualsAndHashCodeRank {
|
||||
public 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.b;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user