Polishing

This commit is contained in:
Juergen Hoeller 2016-07-27 16:21:55 +02:00
parent 316244d2bd
commit 5db449556b
3 changed files with 19 additions and 11 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -72,58 +72,71 @@ public abstract class AbstractCircularImportDetectionTests {
@Configuration @Configuration
@Import(B.class) @Import(B.class)
static class A { static class A {
@Bean @Bean
TestBean b1() { TestBean b1() {
return new TestBean(); return new TestBean();
} }
} }
@Configuration @Configuration
@Import(A.class) @Import(A.class)
static class B { static class B {
@Bean @Bean
TestBean b2() { TestBean b2() {
return new TestBean(); return new TestBean();
} }
} }
@Configuration @Configuration
@Import( { Y.class, Z.class }) @Import({Y.class, Z.class})
class X { class X {
@Bean @Bean
TestBean x() { TestBean x() {
return new TestBean(); return new TestBean();
} }
} }
@Configuration @Configuration
class Y { class Y {
@Bean @Bean
TestBean y() { TestBean y() {
return new TestBean(); return new TestBean();
} }
} }
@Configuration @Configuration
@Import( { Z1.class, Z2.class }) @Import({Z1.class, Z2.class})
class Z { class Z {
@Bean @Bean
TestBean z() { TestBean z() {
return new TestBean(); return new TestBean();
} }
} }
@Configuration @Configuration
class Z1 { class Z1 {
@Bean @Bean
TestBean z1() { TestBean z1() {
return new TestBean(); return new TestBean();
} }
} }
@Configuration @Configuration
@Import(Z.class) @Import(Z.class)
class Z2 { class Z2 {
@Bean @Bean
TestBean z2() { TestBean z2() {
return new TestBean(); return new TestBean();

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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; import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
/** /**
* Unit test proving that ASM-based {@link ConfigurationClassParser} correctly detects circular * Unit test proving that ASM-based {@link ConfigurationClassParser} correctly detects
* use of the {@link Import @Import} annotation. * circular use of the {@link Import @Import} annotation.
*
* <p>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.
* *
* @author Chris Beams * @author Chris Beams
*/ */

View File

@ -457,7 +457,6 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
@Override @Override
public void handleMessage(Message<?> message) { public void handleMessage(Message<?> message) {
} }
} }