8282573: ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)

Reviewed-by: psandoz, thartmann
This commit is contained in:
Emanuel Peter 2022-03-04 12:55:57 +00:00 committed by Tobias Hartmann
parent d5e8e52f02
commit a584c904a9

View File

@ -216,8 +216,10 @@ class MyByteBuffer {
}
void ck(double x, double y) {
if (x == x && y == y && x != y) {
ck(x, 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)) + ")");
}
}