diff --git a/test/hotspot/jtreg/compiler/intrinsics/unsafe/ByteBufferTest.java b/test/hotspot/jtreg/compiler/intrinsics/unsafe/ByteBufferTest.java index 18695062056..6294e90a8a9 100644 --- a/test/hotspot/jtreg/compiler/intrinsics/unsafe/ByteBufferTest.java +++ b/test/hotspot/jtreg/compiler/intrinsics/unsafe/ByteBufferTest.java @@ -216,10 +216,8 @@ class MyByteBuffer { } void ck(double x, double y) { - if (x != y) { - throw new RuntimeException(" x = " + Double.toString(x) + ", y = " + Double.toString(y) - + " (x = " + Long.toHexString(Double.doubleToRawLongBits(x)) - + ", y = " + Long.toHexString(Double.doubleToRawLongBits(y)) + ")"); + if (x == x && y == y && x != y) { + ck(x, y); } }