On Wed, 15 Nov 2023 16:40:53 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Unpacking the rethrown exceptions from Gatherers.mapConcurrent() > > test/jdk/java/util/stream/GathererAPITest.java line 77: > >> 75: return; >> 76: } >> 77: fail("Expected NullPointerException but wasn't thrown!"); > > If you are updating this test then you could use > assertThrows(UnsupportedOperationException.class, supplier::get) here, same > in assertThrowsNPE. It's just a minor thing as I'm reading through some of > the tests. That's a good point. Earlier these utilities did unwrapping to type-test a cause, but how it's written now it can definitely be replaced with an assertThrows. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1394527319