You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@AliasFor attribute name should default to declaring attribute [SPR-13828] #18401
@AliasFor currently insists on the attribute name to be specified, through either attribute or value. For references to same-named attributes on meta-annotations, the attribute name could easily default to the declaring attribute. A typical use case is creating custom @Value annotations with a mirrored value attribute (#18181).
As a consequence, we throw an exception in case of a reference to the same attribute now, suggesting to point either to a specific meta-annotation or to a different attribute name. The default attribute name is the declaring attribute now but the exception will be thrown in case of an explicit reference to the same attribute on the same annotation as well.
Activity
spring-projects-issues commentedon Dec 29, 2015
Juergen Hoeller commented
As a consequence, we throw an exception in case of a reference to the same attribute now, suggesting to point either to a specific meta-annotation or to a different attribute name. The default attribute name is the declaring attribute now but the exception will be thrown in case of an explicit reference to the same attribute on the same annotation as well.
spring-projects-issues commentedon Dec 29, 2015
Sam Brannen commented
That's a nice convention to support.
Thanks, Juergen Hoeller! (y)