RFR: 8365467: Issues with jrtfs implementation for exploded run-time images [v2]

Chen Liang liach at openjdk.org
Wed Sep 3 17:59:45 UTC 2025


On Wed, 3 Sep 2025 17:44:33 GMT, David Beaumont <duke at openjdk.org> wrote:

>> Ooooh. That's interesting.
>> So before, these nodes were none of the types resource, directory or link.
>> And obviously that was working to an extent.
>> And you're right that "isResource()" should imply "getResource()" works, but if that's the case, how can a JRT file system be built on top of this at all?
>> I need to investigate more...
>
> Ah no, there is not, and never was a "getResource()" method on the node class. Nodes are not inner classes and do not have access to the image.
> The getResource() method exists (both now and before my changes) on the ExplocedImage class.
> So I think what I've done here is correct, and no other changes are necessary.

I think this was the method I saw: https://github.com/openjdk/jdk/blob/1408def0c09c6da9cd1ba2b36a8c25de21f0f193/src/java.base/share/classes/jdk/internal/jimage/ImageReader.java#L572
It is package private so we cannot override it here. What is it for at all then...

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26757#discussion_r2319767738


More information about the core-libs-dev mailing list