Files
Bas Leijdekkers 7fbe663b37 Java: don't add instance check when generating equals() (IDEA-357686)
GitOrigin-RevId: 21a0555c2fe6be705fe4d510c8d8d08238af4585
2024-09-25 21:53:25 +00:00

14 lines
297 B
Java

class Test {
float d;
public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;
final Test test = (Test) o;
return Float.compare(d, test.d) == 0;
}
public int hashCode() {
return Float.floatToIntBits(d);
}
}