From 6826bdd1114a2cef72f8624ceba525639a9fbe14 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 31 Mar 2016 14:38:15 +0200 Subject: [PATCH] Document disabled test for hybrid annotation attribute overrides This commit documents the @Ignore'd test to explain that Spring does not support a hybrid approach for annotation attribute overrides with transitive implicit aliases. Issue: SPR-13554 --- .../annotation/AnnotatedElementUtilsTests.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java index 742a3ac708..bd9a6fbd28 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java @@ -308,7 +308,15 @@ public class AnnotatedElementUtilsTests { assertTrue(isAnnotated(element, name)); } - @Ignore("Disabled until SPR-13554 is addressed") + /** + * This test should never pass, simply because Spring does not support a hybrid + * approach for annotation attribute overrides with transitive implicit aliases. + * See SPR-13554 for details. + *

Furthermore, if you choose to execute this test, it can fail for either + * the first test class or the second one (with different exceptions), depending + * on the order in which the JVM returns the attribute methods via reflection. + */ + @Ignore("Permanently disabled but left in place for illustrative purposes") @Test public void getMergedAnnotationAttributesWithHalfConventionBasedAndHalfAliasedComposedAnnotation() { for (Class clazz : asList(HalfConventionBasedAndHalfAliasedComposedContextConfigClassV1.class, @@ -860,6 +868,10 @@ public class AnnotatedElementUtilsTests { String[] locations(); } + /** + * This hybrid approach for annotation attribute overrides with transitive implicit + * aliases is unsupported. See SPR-13554 for details. + */ @ContextConfig @Retention(RetentionPolicy.RUNTIME) @interface HalfConventionBasedAndHalfAliasedComposedContextConfig {