Skip to content

[GR-65294] Fix Class.forName folding when respecting class loaders. #11301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

graalvmbot
Copy link
Collaborator

  • Fix Class.forName folding when respecting class loaders

    At build-time ClassLoader.getSystemClassLoader() is the native image class loader.
    It is replaced by an application class loader for use at runtime.
    In reflection plugins we observe what will become the runtime value, not the native image class loader.

  • Fix NPE when looking up package-less classes in the boot registry.

    We should never resolve package-less classes in the modules file.

At build-time `ClassLoader.getSystemClassLoader()` is the native image
class loader. It is replaced by an application class loader for use at
runtime. In reflection plugins we observe what will become the runtime
value, not the native image class loader.
We should never resolve package-less classes in the modules file.
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 2, 2025
@graalvmbot graalvmbot closed this Jun 3, 2025
@graalvmbot graalvmbot deleted the gd/forname-folding branch June 3, 2025 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants