From b1a938fa244d45fdc637dad6a731b2f38af69460 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Mon, 21 Oct 2019 09:06:56 -0700 Subject: [PATCH] Polishing --- .../core/annotation/MergedAnnotation.java | 2 +- .../core/annotation/MergedAnnotationPredicates.java | 12 ++++++------ .../core/annotation/MergedAnnotationsCollection.java | 2 +- .../core/annotation/AnnotatedElementUtilsTests.java | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotation.java b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotation.java index 3ec013e432..be62d40d94 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotation.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotation.java @@ -622,7 +622,7 @@ public interface MergedAnnotation { } /** - * Factory method to create a {@link Adapt} array from a set of boolean flags. + * Factory method to create an {@link Adapt} array from a set of boolean flags. * @param classToString if {@link Adapt#CLASS_TO_STRING} is included * @param annotationsToMap if {@link Adapt#ANNOTATION_TO_MAP} is included * @return a new {@link Adapt} array diff --git a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java index d62620f7d3..9fafbc0d7f 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotationPredicates.java @@ -41,7 +41,7 @@ public abstract class MergedAnnotationPredicates { /** - * Create a new {@link Predicate} that evaluates to {@code true} if the + * Create a new {@link Predicate} that evaluates to {@code true} if the name of the * {@linkplain MergedAnnotation#getType() merged annotation type} is contained in * the specified array. * @param the annotation type @@ -67,7 +67,7 @@ public abstract class MergedAnnotationPredicates { /** * Create a new {@link Predicate} that evaluates to {@code true} if the * {@linkplain MergedAnnotation#getType() merged annotation type} is contained in - * the collection. + * the specified collection. * @param the annotation type * @param types the type names or classes that should be matched * @return a {@link Predicate} to test the annotation type @@ -82,12 +82,12 @@ public abstract class MergedAnnotationPredicates { * Create a new stateful, single use {@link Predicate} that matches only * the first run of an extracted value. For example, * {@code MergedAnnotationPredicates.firstRunOf(MergedAnnotation::distance)} - * will match the first annotation, and any subsequent run that have the + * will match the first annotation, and any subsequent runs that have the * same distance. *

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 {};