From 8ea913392ce71f6a1ee0ee2458d213617f7b2d27 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 9 Aug 2018 18:49:24 +0200 Subject: [PATCH] Link to Eclipse bug for annotations on bridge methods --- .../core/annotation/AnnotationUtilsTests.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java index 2fb351dee0..87fc87f9b2 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java @@ -150,9 +150,13 @@ public class AnnotationUtilsTests { .anyMatch(element -> element.getClassName().startsWith("org.eclipse.jdt")); // As of JDK 8, invoking getAnnotation() on a bridge method actually finds an - // annotation on its 'bridged' method; however, the Eclipse compiler still does - // not properly support this. Thus, we effectively ignore the following assertion - // if the test is currently executing within the Eclipse IDE. + // annotation on its 'bridged' method [1]; however, the Eclipse compiler will not + // support this until Eclipse 4.9 [2]. Thus, we effectively ignore the following + // assertion if the test is currently executing within the Eclipse IDE. + // + // [1] https://bugs.openjdk.java.net/browse/JDK-6695379 + // [2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=495396 + // if (!runningInEclipse) { assertNotNull(bridgeMethod.getAnnotation(Transactional.class)); }