@@ -956,21 +956,14 @@ public void postProcess(AnnotatedElement element, Annotation annotation, Annotat
956956
957957			for  (Method  attributeMethod  : AnnotationUtils .getAttributeMethods (annotation .annotationType ())) {
958958				String  attributeName  = attributeMethod .getName ();
959- 				List < String >  aliases  = AnnotationUtils .getAliasedAttributeNames (attributeMethod , targetAnnotationType );
959+ 				String   attributeOverrideName  = AnnotationUtils .getAttributeOverrideName (attributeMethod , targetAnnotationType );
960960
961961				// Explicit annotation attribute override declared via @AliasFor 
962- 				if  (!aliases .isEmpty ()) {
963- 					if  (aliases .size () != 1 ) {
964- 						throw  new  IllegalStateException (String .format (
965- 							"Alias list for annotation attribute [%s] must contain at most one element: %s" ,
966- 							attributeMethod , aliases ));
967- 					}
968- 					String  aliasedAttributeName  = aliases .get (0 );
969- 					if  (attributes .containsKey (aliasedAttributeName )) {
970- 						overrideAttribute (element , annotation , attributes , attributeName , aliasedAttributeName );
962+ 				if  (attributeOverrideName  != null ) {
963+ 					if  (attributes .containsKey (attributeOverrideName )) {
964+ 						overrideAttribute (element , annotation , attributes , attributeName , attributeOverrideName );
971965					}
972966				}
973- 
974967				// Implicit annotation attribute override based on convention 
975968				else  if  (!AnnotationUtils .VALUE .equals (attributeName ) && attributes .containsKey (attributeName )) {
976969					overrideAttribute (element , annotation , attributes , attributeName , attributeName );
0 commit comments