mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
[java-code.generation] IDEA-319808 Generated hashCode method has faulty != +0.0f check
GitOrigin-RevId: 5dc591c2b342c2201cf1d5430a6e8209178eaf7f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f69ac74f13
commit
97dffbd482
@@ -52,7 +52,7 @@ public int hashCode() {
|
||||
#elseif ($field.boolean)
|
||||
($fName ? 1 : 0)##
|
||||
#elseif ($field.float)
|
||||
($fName != +0.0f ? java.lang.Float.floatToIntBits($fName) : 0)##
|
||||
($fName != 0.0f ? java.lang.Float.floatToIntBits($fName) : 0)##
|
||||
#elseif ($field.double)
|
||||
#set($tempName = "#getTempVarName()")
|
||||
(int) ($tempName ^ ($tempName >>> 32))##
|
||||
|
||||
@@ -60,7 +60,7 @@ class A {
|
||||
result = 31 * result + (int) a8;
|
||||
result = 31 * result + a9;
|
||||
result = 31 * result + (int) (a10 ^ (a10 >>> 32));
|
||||
result = 31 * result + (a11 != +0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
result = 31 * result + (a11 != 0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
temp = Double.doubleToLongBits(a12);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
result = 31 * result + (a13 != null ? a13.hashCode() : 0);
|
||||
|
||||
@@ -60,7 +60,7 @@ class A {
|
||||
result = 31 * result + (int) a8;
|
||||
result = 31 * result + a9;
|
||||
result = 31 * result + (int) (a10 ^ (a10 >>> 32));
|
||||
result = 31 * result + (a11 != +0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
result = 31 * result + (a11 != 0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
temp = Double.doubleToLongBits(a12);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
result = 31 * result + a13.hashCode();
|
||||
|
||||
@@ -108,7 +108,7 @@ class A {
|
||||
result = 31 * result + (int) getA8();
|
||||
result = 31 * result + getA9();
|
||||
result = 31 * result + (int) (getA10() ^ (getA10() >>> 32));
|
||||
result = 31 * result + (getA11() != +0.0f ? Float.floatToIntBits(getA11()) : 0);
|
||||
result = 31 * result + (getA11() != 0.0f ? Float.floatToIntBits(getA11()) : 0);
|
||||
temp = Double.doubleToLongBits(getA12());
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
result = 31 * result + (a13 != null ? a13.hashCode() : 0);
|
||||
|
||||
@@ -56,7 +56,7 @@ class A {
|
||||
result = 31 * result + (int) a8;
|
||||
result = 31 * result + a9;
|
||||
result = 31 * result + (int) (a10 ^ (a10 >>> 32));
|
||||
result = 31 * result + (a11 != +0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
result = 31 * result + (a11 != 0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
result = 31 * result + a13.hashCode();
|
||||
result = 31 * result + a14.hashCode();
|
||||
return result;
|
||||
|
||||
@@ -72,7 +72,7 @@ class A extends B {
|
||||
result = 31 * result + (int) a8;
|
||||
result = 31 * result + a9;
|
||||
result = 31 * result + (int) (a10 ^ (a10 >>> 32));
|
||||
result = 31 * result + (a11 != +0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
result = 31 * result + (a11 != 0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
temp = Double.doubleToLongBits(a12);
|
||||
result = 31 * result + (int) (temp ^ (temp >>> 32));
|
||||
result = 31 * result + a13.hashCode();
|
||||
|
||||
@@ -60,7 +60,7 @@ class A {
|
||||
result1 = 31 * result1 + (int) a8;
|
||||
result1 = 31 * result1 + a9;
|
||||
result1 = 31 * result1 + (int) (a10 ^ (a10 >>> 32));
|
||||
result1 = 31 * result1 + (a11 != +0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
result1 = 31 * result1 + (a11 != 0.0f ? Float.floatToIntBits(a11) : 0);
|
||||
temp1 = Double.doubleToLongBits(temp);
|
||||
result1 = 31 * result1 + (int) (temp1 ^ (temp1 >>> 32));
|
||||
result1 = 31 * result1 + result.hashCode();
|
||||
|
||||
@@ -13,6 +13,6 @@ class Test {
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (d != +0.0f ? Float.floatToIntBits(d) : 0);
|
||||
return (d != 0.0f ? Float.floatToIntBits(d) : 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user