mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 18:15:55 +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
@@ -72,25 +72,25 @@ public final @Value @Builder class BuilderDefaults {
|
||||
final BuilderDefaults other = (BuilderDefaults) o;
|
||||
if ((this.getX() != other.getX()))
|
||||
return false;
|
||||
if ((this.getZ() != other.getZ()))
|
||||
return false;
|
||||
final java.lang.Object this$name = this.getName();
|
||||
final java.lang.Object other$name = other.getName();
|
||||
if (((this$name == null) ? (other$name != null) : (! this$name.equals(other$name))))
|
||||
return false;
|
||||
if ((this.getZ() != other.getZ()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
result = ((result * PRIME) + this.getX());
|
||||
final java.lang.Object $name = this.getName();
|
||||
result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
|
||||
final long $z = this.getZ();
|
||||
result = ((result * PRIME) + (int) ($z ^ ($z >>> 32)));
|
||||
final java.lang.Object $name = this.getName();
|
||||
result = ((result * PRIME) + (($name == null) ? 43 : $name.hashCode()));
|
||||
return result;
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (((((("BuilderDefaults(x=" + this.getX()) + ", name=") + this.getName()) + ", z=") + this.getZ()) + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user