> https://bugs.openjdk.java.net/browse/JDK-8255800 could have been a one line > spec clean up but > it didn't take a lot of looking to realize there were many more > inconsistencies between spec and implementation. > I've spent a lot of time on what is just small number of factory methods in > Raster because there are so > many possible exceptions and in some cases they rely on other API they call > to generate exceptions and > these may have not been documented or documented acc. to some long lost > behavior. > I've mostly tried to ONLY change spec. But I couldn't help myself when some > checks were missed that > ended up with bizarre and dubious behavior - throwing > NegativeArrayIndexException which just about > always has to be an internal bug ! > > The supplied test passes on JDK 16 as well as this code, because the > (relatively) small number of > cases where JDK 16 threw NegativeArrayIndexException are caught and allowed > only for releases < 17 > So where you see those in the test it corresponds to the behavioral changes > from NegativeArrayIndexException > to IllegalArgumentException. > JCK conformance tests still pass so they must not test those conditions.
Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8255800: Raster creation methods need some specification clean up ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/3223/files - new: https://git.openjdk.java.net/jdk/pull/3223/files/85148fd5..ba2ab76c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3223&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3223&range=01-02 Stats: 29 lines in 2 files changed: 27 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/3223.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3223/head:pull/3223 PR: https://git.openjdk.java.net/jdk/pull/3223