On Tue, 6 Jan 2026 11:03:45 GMT, David Beaumont <[email protected]> wrote:
>> Remove ineffective/unused ImageBufferCache class, and simplify callers /
>> remove dead code.
>>
>> I removed the release methods in the internal classes, but the public
>> ModuleReader API method is still there (the override can go away though
>> since the default implementation also tests for non-null, so removing the
>> override has no risk).
>>
>> I suspect there are no implementations of ModuleReader that implement
>> release semantics after this change, so perhaps we could relax the
>> documentation around it? Thoughts welcome.
>
> David Beaumont has updated the pull request incrementally with one additional
> commit since the last revision:
>
> simplifying allocation and argument checks
src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java line 390:
> 388: }
> 389:
> 390: if (read != size) {
Since the size check already happened in the caller, this check is never
triggered, and if the rounding is removed, the limit() call isn't needed, so
this method collapses into a single allocate method call which can be inlined.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29043#discussion_r2664615982