Skip to content

Commit 91e46cf

Browse files
committed
Update TODOs in AnnotatedElementUtils[Tests]
Issue: SPR-12738
1 parent 25187ee commit 91e46cf

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,6 @@ private static <T> T processWithFindSemantics(AnnotatedElement element, String a
479479
}
480480

481481
try {
482-
// TODO [SPR-12738] Resolve equivalent parameterized
483-
// method (i.e., bridged method) in superclass.
484482
Method equivalentMethod = clazz.getDeclaredMethod(method.getName(),
485483
method.getParameterTypes());
486484
Method resolvedEquivalentMethod = BridgeMethodResolver.findBridgedMethod(equivalentMethod);

spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,23 +209,20 @@ public void findAnnotationAttributesInheritedFromAbstractMethod() throws NoSuchM
209209
}
210210

211211
/**
212-
* TODO [SPR-12738] Enable test.
213-
*
214212
* <p>{@code AbstractClassWithInheritedAnnotation} declares {@code handleParameterized(T)}; whereas,
215213
* {@code ConcreteClassWithInheritedAnnotation} declares {@code handleParameterized(String)}.
216214
*
217-
* <p>Thus, this test fails because {@code AnnotatedElementUtils.processWithFindSemantics()}
218-
* does not resolve an equivalent method for {@code handleParameterized(String)}
219-
* in {@code AbstractClassWithInheritedAnnotation}.
215+
* <p>As of Spring 4.2 RC1, {@code AnnotatedElementUtils.processWithFindSemantics()} does not resolve an
216+
* <em>equivalent</em> method in {@code AbstractClassWithInheritedAnnotation} for the <em>bridged</em>
217+
* {@code handleParameterized(String)} method.
220218
*
221219
* @since 4.2
222220
*/
223-
@Ignore("Disabled until SPR-12738 is resolved")
224221
@Test
225222
public void findAnnotationAttributesInheritedFromBridgedMethod() throws NoSuchMethodException {
226223
Method method = ConcreteClassWithInheritedAnnotation.class.getMethod("handleParameterized", String.class);
227224
AnnotationAttributes attributes = findAnnotationAttributes(method, Transactional.class);
228-
assertNotNull("Should find @Transactional on ConcreteClassWithInheritedAnnotation.handleParameterized() method", attributes);
225+
assertNull("Should not find @Transactional on bridged ConcreteClassWithInheritedAnnotation.handleParameterized() method", attributes);
229226
}
230227

231228
/**
@@ -252,7 +249,7 @@ public void findAnnotationAttributesFromBridgeMethod() throws NoSuchMethodExcept
252249
assertTrue(bridgedMethod != null && !bridgedMethod.isBridge());
253250

254251
AnnotationAttributes attributes = findAnnotationAttributes(bridgeMethod, Order.class);
255-
assertNotNull("Should find @Order on StringGenericParameter.getFor() method", attributes);
252+
assertNotNull("Should find @Order on StringGenericParameter.getFor() bridge method", attributes);
256253
}
257254

258255

0 commit comments

Comments
 (0)