diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java index 10aa8ee950e..d73412ebae9 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,58 +72,71 @@ public abstract class AbstractCircularImportDetectionTests { @Configuration @Import(B.class) static class A { + @Bean TestBean b1() { return new TestBean(); } } + @Configuration @Import(A.class) static class B { + @Bean TestBean b2() { return new TestBean(); } } + @Configuration - @Import( { Y.class, Z.class }) + @Import({Y.class, Z.class}) class X { + @Bean TestBean x() { return new TestBean(); } } + @Configuration class Y { + @Bean TestBean y() { return new TestBean(); } } + @Configuration - @Import( { Z1.class, Z2.class }) + @Import({Z1.class, Z2.class}) class Z { + @Bean TestBean z() { return new TestBean(); } } + @Configuration class Z1 { + @Bean TestBean z1() { return new TestBean(); } } + @Configuration @Import(Z.class) class Z2 { + @Bean TestBean z2() { return new TestBean(); diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java index 8cb5152ea06..c0c32c38a58 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,8 @@ import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.type.classreading.CachingMetadataReaderFactory; /** - * Unit test proving that ASM-based {@link ConfigurationClassParser} correctly detects circular - * use of the {@link Import @Import} annotation. - * - *
While this test is the only subclass of {@link AbstractCircularImportDetectionTests}, - * the hierarchy remains in place in case a JDT-based ConfigurationParser implementation - * needs to be developed. + * Unit test proving that ASM-based {@link ConfigurationClassParser} correctly detects + * circular use of the {@link Import @Import} annotation. * * @author Chris Beams */ diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java index 97b2028d435..bace1fc4f73 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java @@ -457,7 +457,6 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC @Override public void handleMessage(Message> message) { } - }