RFR: 8343416: CDS dump fails when unregistered class can also be loaded from system modules

Matias Saavedra Silva matsaave at openjdk.org
Wed Nov 13 19:31:36 UTC 2024


On Tue, 12 Nov 2024 22:19:25 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

> For classes to be loaded by a custom class loader during dump time, we currently use the `URLClassLoader.loadClass` to load the class which will be delegated to the boot class loader if the class is from a system module jar (e.g. jrt-fs.jar). To avoid the delegation and load the class by a custom class loader, this fix uses the `URLClassLoader.findClass` instead.
> 
> Passed tiers 1 - 3 testing.

LGTM! Thanks

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

Marked as reviewed by matsaave (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22049#pullrequestreview-2434194082


More information about the hotspot-runtime-dev mailing list