RFR: 7903808: IOOBE in compile action when processing class files only [v2]
Jonathan Gibbons
jjg at openjdk.org
Mon Sep 9 22:24:16 UTC 2024
On Mon, 9 Sep 2024 08:39:51 GMT, Christian Stein <cstein at openjdk.org> wrote:
>> Please review this fix preventing an `IndexOutOfBoundsException` in the compile action when processing class files only.
>>
>> As an library used by a test might need `--enable-preview` it is possible that the `insertPos` variable is still assigned with the value `-1`: the `for (String currArg : args) { ... }` loop may exit normally without setting a valid insertion position.
>>
>> This change checks for `-1` values and use `0` instead in order to prepend `--enable-preview` and `--source N` before any variadic arguments.
>
> Christian Stein has updated the pull request incrementally with one additional commit since the last revision:
>
> Add test for 7903808
Marked as reviewed by jjg (Lead).
-------------
PR Review: https://git.openjdk.org/jtreg/pull/224#pullrequestreview-2291051853
More information about the jtreg-dev
mailing list