RFR: 8365467: Issues with jrtfs implementation for exploded run-time images [v2]
David Beaumont
duke at openjdk.org
Thu Sep 4 09:13:44 UTC 2025
On Wed, 3 Sep 2025 17:57:06 GMT, Chen Liang <liach at openjdk.org> wrote:
>> 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...
It's for getting the location from a Resource node inside the getResource(Node) method.
ExplodedImage nodes just don't use ImageLocation at all, so cannot need it.
getResource(Node) is overloaded on ExplodedImage and the parent method never called.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26757#discussion_r2321371300
More information about the core-libs-dev
mailing list