On Tue, 4 Nov 2025 23:34:54 GMT, David Beaumont <[email protected]> wrote:
> Creates a new, narrowed API explicitly for use by jlink, which view the > resource entries in a jimage file without the re-mapping of names and > invention of synthetic entries inherent in ImageReader. > > Another good reason to express this new API as something other than > ImageReader is that, to fix issues such as > [JDK-8357249](https://bugs.openjdk.org/browse/JDK-8357249), we don't want to > have the (System)ImageReader class used directly in jlink code. It's just the > wrong abstraction and will make it harder to refactor jlink to use a > non-singleton API with a controlled lifetime later. > > I've not added unit tests for the new API (yet), but the fact the > PackagedModulesVsRuntimeImageLinkTest passes with preview content in the > jimage file means that it's working as expected. This pull request has now been integrated. Changeset: 66a87cec Author: David Beaumont <[email protected]> Committer: Roger Riggs <[email protected]> URL: https://git.openjdk.org/valhalla/commit/66a87cecc02e99f3de336b004c7baaba7d428f55 Stats: 438 lines in 8 files changed: 269 ins; 87 del; 82 mod 8371292: [lworld] Switch JLink to not use ImageReader API Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/valhalla/pull/1721
