mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 00:16:47 +00:00
Issue 366: don't call the getter twice, fixed for javac.
This commit is contained in:
1 parent
d8e933223f
commit
5a13db5dc9
10 files changed
+170
-93
No files matched your search
@@ -3,6 +3,7 @@
|
||||
boolean[] y;
|
||||
Object[] z;
|
||||
String a;
|
||||
String b;
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) {
|
||||
if ((o == this))
|
||||
return true;
|
||||
@@ -17,8 +18,14 @@
|
||||
return false;
|
||||
if ((! java.util.Arrays.deepEquals(this.z, other.z)))
|
||||
return false;
|
||||
if (((this.a == null) ? (other.a != null) : (! this.a.equals((java.lang.Object) other.a))))
|
||||
final java.lang.Object this$a = this.a;
|
||||
final java.lang.Object other$a = other.a;
|
||||
if (((this$a == null) ? (other$a != null) : (! this$a.equals(other$a))))
|
||||
return false;
|
||||
final java.lang.Object this$b = this.b;
|
||||
final java.lang.Object other$b = other.b;
|
||||
if (((this$b == null) ? (other$b != null) : (! this$b.equals(other$b))))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) {
|
||||
@@ -30,7 +37,10 @@
|
||||
result = ((result * PRIME) + this.x);
|
||||
result = ((result * PRIME) + java.util.Arrays.hashCode(this.y));
|
||||
result = ((result * PRIME) + java.util.Arrays.deepHashCode(this.z));
|
||||
result = ((result * PRIME) + ((this.a == null) ? 0 : this.a.hashCode()));
|
||||
final java.lang.Object $a = this.a;
|
||||
result = ((result * PRIME) + (($a == null) ? 0 : $a.hashCode()));
|
||||
final java.lang.Object $b = this.b;
|
||||
result = ((result * PRIME) + (($b == null) ? 0 : $b.hashCode()));
|
||||
return result;
|
||||
}
|
||||
EqualsAndHashCode() {
|
||||
@@ -39,6 +49,9 @@
|
||||
}
|
||||
final @lombok.EqualsAndHashCode class EqualsAndHashCode2 {
|
||||
int x;
|
||||
long y;
|
||||
float f;
|
||||
double d;
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) {
|
||||
if ((o == this))
|
||||
return true;
|
||||
@@ -47,12 +60,23 @@ final @lombok.EqualsAndHashCode class EqualsAndHashCode2 {
|
||||
final @java.lang.SuppressWarnings("all") EqualsAndHashCode2 other = (EqualsAndHashCode2) o;
|
||||
if ((this.x != other.x))
|
||||
return false;
|
||||
if ((this.y != other.y))
|
||||
return false;
|
||||
if ((java.lang.Float.compare(this.f, other.f) != 0))
|
||||
return false;
|
||||
if ((java.lang.Double.compare(this.d, other.d) != 0))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
|
||||
final int PRIME = 31;
|
||||
int result = 1;
|
||||
result = ((result * PRIME) + this.x);
|
||||
final long $y = this.y;
|
||||
result = ((result * PRIME) + (int) ($y ^ ($y >>> 32)));
|
||||
result = ((result * PRIME) + java.lang.Float.floatToIntBits(this.f));
|
||||
final long $d = java.lang.Double.doubleToLongBits(this.d);
|
||||
result = ((result * PRIME) + (int) ($d ^ ($d >>> 32)));
|
||||
return result;
|
||||
}
|
||||
EqualsAndHashCode2() {
|
||||
|
||||
Reference in new issue
Block a user