Skip to content

Commit 1c8ac2b

Browse files
committed
Update @AliasFor Javadoc regarding new 'value' alias
Issue: SPR-13289
1 parent 7252920 commit 1c8ac2b

File tree

1 file changed

+4
-4
lines changed
  • spring-core/src/main/java/org/springframework/core/annotation

1 file changed

+4
-4
lines changed

spring-core/src/main/java/org/springframework/core/annotation/AliasFor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
* <li><strong>Aliases within an annotation</strong>:
6161
* <ol>
6262
* <li>Each attribute that makes up an aliased pair must be annotated with
63-
* {@code @AliasFor}, and the {@link #attribute} must reference the
64-
* <em>other</em> attribute in the pair.</li>
63+
* {@code @AliasFor}, and either the {@link #attribute} or the {@link #value}
64+
* attribute must reference the <em>other</em> attribute in the pair.</li>
6565
* <li>Aliased attributes must declare the same return type.</li>
6666
* <li>Aliased attributes must declare a default value.</li>
6767
* <li>Aliased attributes must declare the same default value.</li>
@@ -84,10 +84,10 @@
8484
* <h3>Example: Aliases within an Annotation</h3>
8585
* <pre class="code"> public &#064;interface ContextConfiguration {
8686
*
87-
* &#064;AliasFor(attribute = "locations")
87+
* &#064;AliasFor("locations")
8888
* String[] value() default {};
8989
*
90-
* &#064;AliasFor(attribute = "value")
90+
* &#064;AliasFor("value")
9191
* String[] locations() default {};
9292
*
9393
* // ...

0 commit comments

Comments
 (0)