Integrated: 7903808: IOOBE in compile action when processing class files only
Christian Stein
cstein at openjdk.org
Tue Sep 10 05:50:19 UTC 2024
On Fri, 30 Aug 2024 19:28:22 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.
This pull request has now been integrated.
Changeset: 4c25e050
Author: Christian Stein <cstein at openjdk.org>
URL: https://git.openjdk.org/jtreg/commit/4c25e05072961f06714095689924cd7c33a613c2
Stats: 62 lines in 2 files changed: 62 ins; 0 del; 0 mod
7903808: IOOBE in compile action when processing class files only
Reviewed-by: jpai, jjg
-------------
PR: https://git.openjdk.org/jtreg/pull/224
More information about the jtreg-dev
mailing list