RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v2]
David Beaumont
duke at openjdk.org
Thu Sep 11 12:06:49 UTC 2025
On Thu, 11 Sep 2025 09:56:30 GMT, David Beaumont <duke at openjdk.org> wrote:
>> If something shouldn't happen, I would prefer an explicit exception or at least an assert.
>
> Not 100% sure it's impossible to tickle this with current callers (e.g. "jrt:/module//path" leaving the trailing path starting with a '/') so I'd rather not risk triggering IAE in existing code.
Thinking about it, it might be sufficient to test that the module name doesn't contain '/'. I'm not sure that rejecting a leading '/' in the path matters for correctness (the implied resource name would be "/<mod>//<path>" and these never exist anyway).
What I'm trying to protect against is having the concatentation of:
"/" + <mod-name> + "/" + <path>
be unexpectedly a different resource (e.g. module name is "java.base/java", path is "lang/Object.class").
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27203#discussion_r2340481195
More information about the core-libs-dev
mailing list