From 1c8ac2b2aa573b776b7ff5e01a403b46cb074295 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 29 Jul 2015 16:08:42 +0200 Subject: [PATCH] Update @AliasFor Javadoc regarding new 'value' alias Issue: SPR-13289 --- .../org/springframework/core/annotation/AliasFor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java b/spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java index 8a9a971748..8c33d8cbf1 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java @@ -60,8 +60,8 @@ import java.lang.annotation.Target; *
  • Aliases within an annotation: *
      *
    1. Each attribute that makes up an aliased pair must be annotated with - * {@code @AliasFor}, and the {@link #attribute} must reference the - * other attribute in the pair.
    2. + * {@code @AliasFor}, and either the {@link #attribute} or the {@link #value} + * attribute must reference the other attribute in the pair. *
    3. Aliased attributes must declare the same return type.
    4. *
    5. Aliased attributes must declare a default value.
    6. *
    7. Aliased attributes must declare the same default value.
    8. @@ -84,10 +84,10 @@ import java.lang.annotation.Target; *

      Example: Aliases within an Annotation

      *
       public @interface ContextConfiguration {
        *
      - *    @AliasFor(attribute = "locations")
      + *    @AliasFor("locations")
        *    String[] value() default {};
        *
      - *    @AliasFor(attribute = "value")
      + *    @AliasFor("value")
        *    String[] locations() default {};
        *
        *    // ...