Skip to content

Commit f5d454e

Browse files
committed
Test status quo for non-inherited composed repeatable annotations
... where the repeatable annotation is inherited. Issue: #1133
1 parent 22fc3de commit f5d454e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

platform-tests/src/test/java/org/junit/platform/commons/util/AnnotationUtilsTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,12 @@ private List<String> asNames(List<Field> fields) {
532532

533533
@Target({ ElementType.TYPE, ElementType.METHOD })
534534
@Retention(RetentionPolicy.RUNTIME)
535-
@Inherited
535+
// Intentionally NOT @Inherited in order to ensure that the algorithm for
536+
// findRepeatableAnnotations() in fact lives up to the claims in the
537+
// JavaDoc regarding searching for repeatable annotations with implicit
538+
// "inheritance" if the repeatable annotation is @Inherited but the
539+
// custom composed annotation is not @Inherited.
540+
// @Inherited
536541
@ExtendWith("bar")
537542
@interface ExtendWithBar {
538543
}

0 commit comments

Comments
 (0)