Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

In this PR we add the tracking of JDK internal methods that can throw a Missing<Reflection/Resource/Serialization>RegistrationError at image run time when missing metadata to the DynamicAccessDetectionPhase. These methods require additional --add-exports/--add-opens flags set when building the image, as they use internal (non-visible) java API.

These are the added methods:

jdk.internal.access.JavaLangAccess#getDeclaredPublicMethods(java.lang.Class, java.lang.String, java.lang.Class[])

jdk.internal.reflect.ReflectionFactory#newConstructorForSerialization(java.lang.Class)
jdk.internal.reflect.ReflectionFactory#newConstructorForSerialization(java.lang.Class, java.lang.reflect.Constructor)
sun.reflect.ReflectionFactory#newConstructorForSerialization(java.lang.Class)
sun.reflect.ReflectionFactory#newConstructorForSerialization(java.lang.Class, java.lang.reflect.Constructor)

jdk.internal.loader.BuiltinClassLoader#findResource(java.lang.String)
jdk.internal.loader.BuiltinClassLoader#findResource(java.lang.String, java.lang.String)
jdk.internal.loader.BuiltinClassLoader#findResources(java.lang.String)
jdk.internal.loader.BuiltinClassLoader#findResourceAsStream(java.lang.String, java.lang.String)

Also in this PR, we add the previously missing java.util.ResourceBundle#getBundle with all its overloads to the dynamic access analysis:

java.util.ResourceBundle#getBundle(java.lang.String)
java.util.ResourceBundle#getBundle(java.lang.String, java.util.ResourceBundle.Control)
java.util.ResourceBundle#getBundle(java.lang.String, java.util.Locale)
java.util.ResourceBundle#getBundle(java.lang.String, java.lang.Module)
java.util.ResourceBundle#getBundle(java.lang.String, java.util.Locale, java.lang.Module)
java.util.ResourceBundle#getBundle(java.lang.String, java.util.Locale, java.util.ResourceBundle.Control)
java.util.ResourceBundle#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
java.util.ResourceBundle#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader, java.util.ResourceBundle.Control)

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 7, 2025
@graalvmbot graalvmbot merged commit dcd8e17 into master Oct 7, 2025
13 checks passed
@graalvmbot graalvmbot deleted the jvukicev/GR-69972 branch October 7, 2025 21:39
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