Merge branch '6.0.x'
# Conflicts: # spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
This commit is contained in:
@@ -72,6 +72,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.core.testfixture.io.SerializationTestUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
@@ -2605,13 +2606,12 @@ public class AutowiredAnnotationBeanPostProcessorTests {
|
||||
@Autowired(required = false)
|
||||
private TestBean testBean;
|
||||
|
||||
private TestBean testBean2;
|
||||
TestBean testBean2;
|
||||
|
||||
@Autowired
|
||||
public void setTestBean2(TestBean testBean2) {
|
||||
if (this.testBean2 != null) {
|
||||
throw new IllegalStateException("Already called");
|
||||
}
|
||||
Assert.state(this.testBean != null, "Wrong initialization order");
|
||||
Assert.state(this.testBean2 == null, "Already called");
|
||||
this.testBean2 = testBean2;
|
||||
}
|
||||
|
||||
@@ -2643,9 +2643,8 @@ public class AutowiredAnnotationBeanPostProcessorTests {
|
||||
|
||||
@Override
|
||||
@Autowired
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setTestBean2(TestBean testBean2) {
|
||||
super.setTestBean2(testBean2);
|
||||
this.testBean2 = testBean2;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@@ -2661,6 +2660,7 @@ public class AutowiredAnnotationBeanPostProcessorTests {
|
||||
|
||||
@Autowired
|
||||
protected void initBeanFactory(BeanFactory beanFactory) {
|
||||
Assert.state(this.baseInjected, "Wrong initialization order");
|
||||
this.beanFactory = beanFactory;
|
||||
}
|
||||
|
||||
@@ -4084,9 +4084,7 @@ public class AutowiredAnnotationBeanPostProcessorTests {
|
||||
private RT obj;
|
||||
|
||||
protected void setObj(RT obj) {
|
||||
if (this.obj != null) {
|
||||
throw new IllegalStateException("Already called");
|
||||
}
|
||||
Assert.state(this.obj == null, "Already called");
|
||||
this.obj = obj;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user