RFR: 8282665: [REDO] ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)

Emanuel Peter duke at openjdk.java.net
Mon Mar 7 09:16:15 UTC 2022


Until now, ck for doubles ignored the case when either x or y was NaN, it for example would let pass x=NaN and y=2.0.
Further, instead of throwing an exception, it went into infinite recursion, with an eventual StackOverflowError.
Now, we throw an exception that prints the values. I fixed the logic, and added an explanation.

Testing is running...

-------------

Commit messages:
 - fix whitespaces
 - 8282665: [REDO] ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y)

Changes: https://git.openjdk.java.net/jdk/pull/7723/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7723&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8282665
  Stats: 10 lines in 1 file changed: 8 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7723.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7723/head:pull/7723

PR: https://git.openjdk.java.net/jdk/pull/7723


More information about the hotspot-compiler-dev mailing list