Skip to content
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

Document that AnnotationSupport.isAnnotated() does not find repeatable annotations #4058

Closed
3 tasks done
sbrannen opened this issue Oct 8, 2024 · 2 comments · Fixed by #4243
Closed
3 tasks done

Comments

@sbrannen
Copy link
Member

sbrannen commented Oct 8, 2024

Overview

The regression reported in #4054 was likely caused by confusion about the semantics of AnnotationSupport.isAnnotated().

Although one might assume that isAnnotated() would return true if the given annotation type is present as a repeatable annotation, it does not actually find repeatable annotations.

Instead, one must use one of the findRepeatableAnnotations() variants and check if the returned list is not empty to reliably determine if an element is annotated with a repeatable annotation.

Related Issues

Deliverables

  • Update the Javadoc for both AnnotationSupport.isAnnotated() variants to reflect this.
  • Update the User Guide documentation for AnnotationSupport to reflect this, if applicable.
  • Update the Javadoc for AnnotatedElementContext.isAnnotated() to reflect this.
@YongGoose
Copy link
Contributor

@marcphilipp

Although I’ve been working on many tasks in the JUnit 5 project, this issue seems to be more about documentation.
Therefore, I believe I can handle it simultaneously.

Through this issue, I hope to further improve my documentation skills 😅

ps. If my workload makes someone else more suitable for this task, I’d be glad to let them take it on❕

@marcphilipp
Copy link
Member

Sure, go for it! 👍

YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 12, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 12, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 12, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 13, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 14, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 14, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 14, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 14, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 15, 2025
YongGoose added a commit to YongGoose/junit5 that referenced this issue Jan 15, 2025
@sbrannen sbrannen self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment