Skip to content

Commit a584c90

Browse files
eme64TobiHartmann
authored andcommitted
8282573: ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)
Reviewed-by: psandoz, thartmann
1 parent d5e8e52 commit a584c90

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/hotspot/jtreg/compiler/intrinsics/unsafe/ByteBufferTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ void ck(long x, long y) {
216216
}
217217

218218
void ck(double x, double y) {
219-
if (x == x && y == y && x != y) {
220-
ck(x, y);
219+
if (x != y) {
220+
throw new RuntimeException(" x = " + Double.toString(x) + ", y = " + Double.toString(y)
221+
+ " (x = " + Long.toHexString(Double.doubleToRawLongBits(x))
222+
+ ", y = " + Long.toHexString(Double.doubleToRawLongBits(y)) + ")");
221223
}
222224
}
223225

0 commit comments

Comments
 (0)