Skip to content

Conversation

dmlloyd
Copy link
Member

@dmlloyd dmlloyd commented Apr 15, 2025

Also, support for @Repeatable. Fixes #341

@dmlloyd dmlloyd added the 2.x Issue applies to Gizmo 2.x label Apr 15, 2025
}
}

void addInvisible(Consumer<? super RuntimeInvisibleAnnotationsAttribute> consumer) {
if (!invisible.isEmpty()) {
consumer.accept(RuntimeInvisibleAnnotationsAttribute.of(visible));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a little bug here.

* If the annotation is {@linkplain Repeatable repeatable}, and adding this annotation would
* cause there to be more than one instance of the given annotation on this element,
* then the existing annotation and the given annotation are automatically wrapped in the
* repeatable annotation wrapper.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* repeatable annotation wrapper.
* container annotation.

it I believe the proper wording.

Copy link
Contributor

@Ladicek Ladicek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but we should have a test :-)

Also, support for `@Repeatable`. Fixes quarkusio#341
@dmlloyd
Copy link
Member Author

dmlloyd commented Apr 15, 2025

Sure enough, the test found a bug. :)

@dmlloyd dmlloyd merged commit 84c3a67 into quarkusio:main Apr 15, 2025
2 checks passed
@dmlloyd dmlloyd deleted the ann-validate branch April 15, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issue applies to Gizmo 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disallow repeat annotations (unless @Repeatable)
2 participants