RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v5]
David Beaumont
duke at openjdk.org
Fri Jul 11 10:21:14 UTC 2025
On Fri, 4 Jul 2025 12:40:43 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> David Beaumont has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Feedback related changes.
>
> src/java.base/share/classes/jdk/internal/jimage/ImageReader.java line 193:
>
>> 191: // of the jimage file itself (creation, modification, access times).
>> 192: // Initialized lazily, see imageFileAttributes().
>> 193: private BasicFileAttributes imageFileAttributes;
>
> It seems there is no reason to keep its initialization lazy: now we call `newDirectory` in constructor which will trigger its initialization anyway.
> We can make it `final` and simplify code a bit.
Yes, good point. I was simply keeping it "as lazy as it was", but you're right, that train has already left the station.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26054#discussion_r2200307185
More information about the core-libs-dev
mailing list