On Sun, 15 Sep 2024 12:59:21 GMT, Claes Redestad <redes...@openjdk.org> wrote:
>> Simple internal refactor to load a few classes less on startup. Arguably >> cleaner and avoids some iterator allocations. > > Claes Redestad has updated the pull request incrementally with one additional > commit since the last revision: > > Improve edge invariant checks > Commit > [62a88c0](https://github.com/openjdk/jdk/commit/62a88c0368512e993df09c14d1b98b28b20e3280) > introduced a TOCTOU issue caused by double‑reading of a user‑supplied array 1. Switching to a null value will trigger a NPE when evaluating the option. 2. Switching values after validation just changes the options from one legal result to another. Weird, but benign. I don't think this requires a fix, but putting in a `options = Set.of(options).toArray(NO_OPTIONS);` wouldn't be too bad. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21002#issuecomment-2351785168