Skip to content

Propagate runtime-visible flag when parsing parameter annotations#509

Merged
garydgregory merged 1 commit into
apache:masterfrom
rootvector2:parameter-annotation-visibility
Jun 25, 2026
Merged

Propagate runtime-visible flag when parsing parameter annotations#509
garydgregory merged 1 commit into
apache:masterfrom
rootvector2:parameter-annotation-visibility

Conversation

@rootvector2

Copy link
Copy Markdown
Contributor

parameter annotations and nested annotation values were parsed with a hardcoded false runtime-visible flag, so a RuntimeVisibleParameterAnnotations attribute reported isRuntimeVisible() == false and a MethodGen round-trip (after the parameter annotations are unpacked) silently rewrote it as RuntimeInvisibleParameterAnnotations, dropping it from runtime reflection; thread the flag from the attribute into ParameterAnnotationEntry and from AnnotationEntry.read into nested annotation values, matching what Annotations already does for field and method annotations.

parameter annotations and nested annotation values were read with a hardcoded isRuntimeVisible=false, so a RuntimeVisibleParameterAnnotations attribute parsed as invisible and a MethodGen round-trip rewrote it as RuntimeInvisibleParameterAnnotations. Thread the flag from the attribute through ParameterAnnotationEntry and AnnotationEntry.read, matching Annotations.
@garydgregory garydgregory changed the title propagate runtime-visible flag when parsing parameter annotations Propagate runtime-visible flag when parsing parameter annotations Jun 25, 2026
@garydgregory garydgregory merged commit 667e888 into apache:master Jun 25, 2026
19 checks passed
@garydgregory

Copy link
Copy Markdown
Member

Merged, ty @rootvector2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants