On Thu, 29 Apr 2021 09:30:50 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove extra newline > > test/hotspot/jtreg/compiler/c1/TestCheckIndexC1Intrinsic.java line 60: > >> 58: } catch (IndexOutOfBoundsException e) { >> 59: // got it! >> 60: } > > In all places where `Precondition.checkIndex` is expected to throw, an > AssertionError should be generated if it doesn't throw: > > > try { > Preconditions.checkIndex(1, 1, null); > throw new AssertionError("Expected IndexOutOfBoundsException not > thrown"); > } catch (IndexOutOfBoundsException e) { > // got it! > } Yes, it does make sense ------------- PR: https://git.openjdk.java.net/jdk/pull/3615