Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

The substitued AnnotationParser goes through the MetadataAccessor instead of the constant pool to get the reflection metadata, which requires a layer number to know in which layer's metadata to go look into.

Sadly, the AnnotationParser methods lose track of the initial class that was queried and only keeps track of the constant pool, which is always null in Native Image.

To keep track of the layer number, the substitued constant pool now contains a layerId field that is set by the DynamicHub. This is only done in Layered Image, so the performance in default Native Image is not affected.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 12, 2025
@graalvmbot graalvmbot merged commit 2630a23 into master Mar 13, 2025
12 of 13 checks passed
@graalvmbot graalvmbot deleted the scoppey/GR-62459/annotation-parser branch March 13, 2025 05:19
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