File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
spring-core/src/main/java/org/springframework/core/annotation Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change 1717package org .springframework .core .annotation ;
1818
1919import java .lang .annotation .Annotation ;
20+ import java .lang .annotation .Repeatable ;
2021import java .lang .reflect .AnnotatedElement ;
2122import java .lang .reflect .Array ;
2223import java .lang .reflect .InvocationHandler ;
@@ -111,8 +112,6 @@ public abstract class AnnotationUtils {
111112 */
112113 public static final String VALUE = "value" ;
113114
114- private static final String REPEATABLE_CLASS_NAME = "java.lang.annotation.Repeatable" ;
115-
116115 private static final Map <AnnotationCacheKey , Annotation > findAnnotationCache =
117116 new ConcurrentReferenceHashMap <>(256 );
118117
@@ -1703,19 +1702,9 @@ static boolean isAnnotationTypeMethod(Method method) {
17031702 * {@code null}.
17041703 * @since 4.2
17051704 */
1706- @ SuppressWarnings ("unchecked" )
17071705 static Class <? extends Annotation > resolveContainerAnnotationType (Class <? extends Annotation > annotationType ) {
1708- try {
1709- Annotation repeatable = getAnnotation (annotationType , REPEATABLE_CLASS_NAME );
1710- if (repeatable != null ) {
1711- Object value = getValue (repeatable );
1712- return (Class <? extends Annotation >) value ;
1713- }
1714- }
1715- catch (Exception ex ) {
1716- handleIntrospectionFailure (annotationType , ex );
1717- }
1718- return null ;
1706+ Repeatable repeatable = getAnnotation (annotationType , Repeatable .class );
1707+ return (repeatable != null ? repeatable .value () : null );
17191708 }
17201709
17211710 /**
You can’t perform that action at this time.
0 commit comments