mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 00:20:54 +07:00
18 lines
409 B
Java
18 lines
409 B
Java
// "Replace with 'Double.hashCode()'" "true-preview"
|
|
|
|
class X {
|
|
private String s;
|
|
private double d1;
|
|
private double d2;
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int result;
|
|
long temp;
|
|
result = s != null ? s.hashCode() : 0;
|
|
temp = Double.doubleToLongBits(d1);
|
|
result = 31 * result + (int)(temp ^ (temp >>> 32));
|
|
result = 31 * result + Double.hashCode(d2);
|
|
return result;
|
|
}
|
|
} |