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

16 lines
352 B
Java

import java.util.Objects;
class Test {
@org.jetbrains.annotations.NotNull Object d;
public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;
final Test test = (Test) o;
return Objects.equals(d, test.d);
}
public int hashCode() {
return Objects.hashCode(d);
}
}