@@ -178,6 +178,13 @@ public void findMethodAnnotationFromInterface() throws Exception {
178178 assertNotNull (order );
179179 }
180180
181+ @ Test // SPR-16060
182+ public void findMethodAnnotationFromGenericInterface () throws Exception {
183+ Method method = ImplementsInterfaceWithGenericAnnotatedMethod .class .getMethod ("foo" , String .class );
184+ Order order = findAnnotation (method , Order .class );
185+ assertNotNull (order );
186+ }
187+
181188 @ Test
182189 public void findMethodAnnotationFromInterfaceOnSuper () throws Exception {
183190 Method method = SubOfImplementsInterfaceWithAnnotatedMethod .class .getMethod ("foo" );
@@ -286,7 +293,7 @@ public void findClassAnnotationOnSubSubNonInheritedAnnotationInterface() {
286293 }
287294
288295 @ Test
289- public void findAnnotationDeclaringClassForAllScenarios () throws Exception {
296+ public void findAnnotationDeclaringClassForAllScenarios () {
290297 // no class-level annotation
291298 assertNull (findAnnotationDeclaringClass (Transactional .class , NonAnnotatedInterface .class ));
292299 assertNull (findAnnotationDeclaringClass (Transactional .class , NonAnnotatedClass .class ));
@@ -395,7 +402,7 @@ public void isAnnotationDeclaredLocallyForAllScenarios() throws Exception {
395402 }
396403
397404 @ Test
398- public void isAnnotationInheritedForAllScenarios () throws Exception {
405+ public void isAnnotationInheritedForAllScenarios () {
399406 // no class-level annotation
400407 assertFalse (isAnnotationInherited (Transactional .class , NonAnnotatedInterface .class ));
401408 assertFalse (isAnnotationInherited (Transactional .class , NonAnnotatedClass .class ));
@@ -504,7 +511,7 @@ public void getDefaultValueFromAnnotation() throws Exception {
504511 }
505512
506513 @ Test
507- public void getDefaultValueFromNonPublicAnnotation () throws Exception {
514+ public void getDefaultValueFromNonPublicAnnotation () {
508515 Annotation [] declaredAnnotations = NonPublicAnnotatedClass .class .getDeclaredAnnotations ();
509516 assertEquals (1 , declaredAnnotations .length );
510517 Annotation annotation = declaredAnnotations [0 ];
@@ -515,7 +522,7 @@ public void getDefaultValueFromNonPublicAnnotation() throws Exception {
515522 }
516523
517524 @ Test
518- public void getDefaultValueFromAnnotationType () throws Exception {
525+ public void getDefaultValueFromAnnotationType () {
519526 assertEquals (Ordered .LOWEST_PRECEDENCE , getDefaultValue (Order .class , VALUE ));
520527 assertEquals (Ordered .LOWEST_PRECEDENCE , getDefaultValue (Order .class ));
521528 }
@@ -547,7 +554,7 @@ public void getRepeatableAnnotationsDeclaredOnClassWithMissingAttributeAliasDecl
547554 }
548555
549556 @ Test
550- public void getRepeatableAnnotationsDeclaredOnClassWithAttributeAliases () throws Exception {
557+ public void getRepeatableAnnotationsDeclaredOnClassWithAttributeAliases () {
551558 final List <String > expectedLocations = asList ("A" , "B" );
552559
553560 Set <ContextConfig > annotations = getRepeatableAnnotations (ConfigHierarchyTestCase .class , ContextConfig .class , null );
@@ -1750,6 +1757,18 @@ public static class TransactionalAndOrderedClass extends TransactionalClass {
17501757 public static class SubTransactionalAndOrderedClass extends TransactionalAndOrderedClass {
17511758 }
17521759
1760+ public interface InterfaceWithGenericAnnotatedMethod <T > {
1761+
1762+ @ Order
1763+ void foo (T t );
1764+ }
1765+
1766+ public static class ImplementsInterfaceWithGenericAnnotatedMethod implements InterfaceWithGenericAnnotatedMethod <String > {
1767+
1768+ public void foo (String t ) {
1769+ }
1770+ }
1771+
17531772 public interface InterfaceWithAnnotatedMethod {
17541773
17551774 @ Order
0 commit comments