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

Emanuel Peter duke at openjdk.java.net
Tue Mar 8 09:25:51 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.
> 
> All tests are passing.

Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:

  simplify

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7723/files
  - new: https://git.openjdk.java.net/jdk/pull/7723/files/a96fbb5d..7aea6882

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7723&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7723&range=01-02

  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 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