Update TODOs in AnnotatedElementUtils[Tests]
Issue: SPR-12738
This commit is contained in:
@@ -479,8 +479,6 @@ public class AnnotatedElementUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// TODO [SPR-12738] Resolve equivalent parameterized
|
|
||||||
// method (i.e., bridged method) in superclass.
|
|
||||||
Method equivalentMethod = clazz.getDeclaredMethod(method.getName(),
|
Method equivalentMethod = clazz.getDeclaredMethod(method.getName(),
|
||||||
method.getParameterTypes());
|
method.getParameterTypes());
|
||||||
Method resolvedEquivalentMethod = BridgeMethodResolver.findBridgedMethod(equivalentMethod);
|
Method resolvedEquivalentMethod = BridgeMethodResolver.findBridgedMethod(equivalentMethod);
|
||||||
|
|||||||
@@ -209,23 +209,20 @@ public class AnnotatedElementUtilsTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO [SPR-12738] Enable test.
|
|
||||||
*
|
|
||||||
* <p>{@code AbstractClassWithInheritedAnnotation} declares {@code handleParameterized(T)}; whereas,
|
* <p>{@code AbstractClassWithInheritedAnnotation} declares {@code handleParameterized(T)}; whereas,
|
||||||
* {@code ConcreteClassWithInheritedAnnotation} declares {@code handleParameterized(String)}.
|
* {@code ConcreteClassWithInheritedAnnotation} declares {@code handleParameterized(String)}.
|
||||||
*
|
*
|
||||||
* <p>Thus, this test fails because {@code AnnotatedElementUtils.processWithFindSemantics()}
|
* <p>As of Spring 4.2 RC1, {@code AnnotatedElementUtils.processWithFindSemantics()} does not resolve an
|
||||||
* does not resolve an equivalent method for {@code handleParameterized(String)}
|
* <em>equivalent</em> method in {@code AbstractClassWithInheritedAnnotation} for the <em>bridged</em>
|
||||||
* in {@code AbstractClassWithInheritedAnnotation}.
|
* {@code handleParameterized(String)} method.
|
||||||
*
|
*
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
*/
|
*/
|
||||||
@Ignore("Disabled until SPR-12738 is resolved")
|
|
||||||
@Test
|
@Test
|
||||||
public void findAnnotationAttributesInheritedFromBridgedMethod() throws NoSuchMethodException {
|
public void findAnnotationAttributesInheritedFromBridgedMethod() throws NoSuchMethodException {
|
||||||
Method method = ConcreteClassWithInheritedAnnotation.class.getMethod("handleParameterized", String.class);
|
Method method = ConcreteClassWithInheritedAnnotation.class.getMethod("handleParameterized", String.class);
|
||||||
AnnotationAttributes attributes = findAnnotationAttributes(method, Transactional.class);
|
AnnotationAttributes attributes = findAnnotationAttributes(method, Transactional.class);
|
||||||
assertNotNull("Should find @Transactional on ConcreteClassWithInheritedAnnotation.handleParameterized() method", attributes);
|
assertNull("Should not find @Transactional on bridged ConcreteClassWithInheritedAnnotation.handleParameterized() method", attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -252,7 +249,7 @@ public class AnnotatedElementUtilsTests {
|
|||||||
assertTrue(bridgedMethod != null && !bridgedMethod.isBridge());
|
assertTrue(bridgedMethod != null && !bridgedMethod.isBridge());
|
||||||
|
|
||||||
AnnotationAttributes attributes = findAnnotationAttributes(bridgeMethod, Order.class);
|
AnnotationAttributes attributes = findAnnotationAttributes(bridgeMethod, Order.class);
|
||||||
assertNotNull("Should find @Order on StringGenericParameter.getFor() method", attributes);
|
assertNotNull("Should find @Order on StringGenericParameter.getFor() bridge method", attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user