RFR: 8265518: C1: Intrinsic support for Preconditions.checkIndex [v5]
Yi Yang
yyang at openjdk.java.net
Thu Apr 29 10:40:52 UTC 2021
On Thu, 29 Apr 2021 10:13:05 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> AssertionError when expected exception was not thrown
>
> test/hotspot/jtreg/compiler/c1/TestCheckIndexC1Intrinsic.java line 94:
>
>> 92: static void check1(int i) {
>> 93: try {
>> 94: Preconditions.checkIndex(i, 9999, (s, integers) -> new RuntimeException("ex"));
>
> I believe
>
> throw new AssertionError("Expected IndexOutOfBoundsException not thrown");
>
>
> should be added in `check1`...`check4` as well...
Hmm.. They would throw desired exceptions only if i==9999.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3615
More information about the core-libs-dev
mailing list