NOTE: This predicate only matches the first run. Once the extracted - * value changes, the predicate always returns {@code false}. I.e. if you - * have a set of annotations with distances {@code [1, 1, 2, 1]} then only - * the first two will match. + * value changes, the predicate always returns {@code false}. For example, + * if you have a set of annotations with distances {@code [1, 1, 2, 1]} then + * only the first two will match. * @param valueExtractor function used to extract the value to check * @return a {@link Predicate} that matches the first run of the extracted * values diff --git a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationsCollection.java b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationsCollection.java index 5f916787e9..4c406494e5 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationsCollection.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationsCollection.java @@ -30,7 +30,7 @@ import org.springframework.lang.Nullable; import org.springframework.util.Assert; /** - * {@link MergedAnnotations} implementation backed by a {@link Collection} + * {@link MergedAnnotations} implementation backed by a {@link Collection} of * {@link MergedAnnotation} instances that represent direct annotations. * * @author Phillip Webb diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java index 69a2e39f55..19a66da16a 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java @@ -875,10 +875,10 @@ class AnnotatedElementUtilsTests { @Inherited @interface AliasedTransactional { - @AliasFor(attribute = "qualifier") + @AliasFor("qualifier") String value() default ""; - @AliasFor(attribute = "value") + @AliasFor("value") String qualifier() default ""; } @@ -956,10 +956,10 @@ class AnnotatedElementUtilsTests { @Retention(RetentionPolicy.RUNTIME) @interface ContextConfig { - @AliasFor(attribute = "locations") + @AliasFor("locations") String[] value() default {}; - @AliasFor(attribute = "value") + @AliasFor("value") String[] locations() default {}; Class>[] classes() default {};