Browse Source

Polishing

pull/1121/merge
Juergen Hoeller 10 years ago
parent
commit
5db449556b
  1. 15
      spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java
  2. 10
      spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java
  3. 1
      spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java

15
spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java

@ -1,5 +1,5 @@ @@ -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 { @@ -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})
class X {
@Bean
TestBean x() {
return new TestBean();
}
}
@Configuration
class Y {
@Bean
TestBean y() {
return new TestBean();
}
}
@Configuration
@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();

10
spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java

@ -1,5 +1,5 @@ @@ -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; @@ -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.
*
* <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.
* Unit test proving that ASM-based {@link ConfigurationClassParser} correctly detects
* circular use of the {@link Import @Import} annotation.
*
* @author Chris Beams
*/

1
spring-messaging/src/main/java/org/springframework/messaging/simp/config/AbstractMessageBrokerConfiguration.java

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

Loading…
Cancel
Save