On Fri, 21 Feb 2025 20:05:07 GMT, Sergey Chernyshev <schernys...@openjdk.org> wrote:
>> Good catch, but as long as cgp#nameCount may change in the loop, this exact >> patch i cannot take. > > How about this? > > int currentNameCount = cgp.getNameCount(); > cgp = (currentNameCount > 1) ? cgp.subpath(1, currentNameCount) : Path.of(""); I tested the builds with the above change. It seems to be doing the thing. Please see the updated PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21808#discussion_r1968429793