Polishing

This commit is contained in:
Sam Brannen
2024-01-05 17:06:32 +01:00
parent 79b0d71514
commit 580d9f81e2
2 changed files with 6 additions and 6 deletions

View File

@@ -153,7 +153,7 @@ public class DependencyInjectionTestExecutionListener extends AbstractTestExecut
}
Object bean = testContext.getTestInstance();
Class<?> clazz = testContext.getTestClass();
String beanName = testContext.getTestClass().getName() + AutowireCapableBeanFactory.ORIGINAL_INSTANCE_SUFFIX;
ConfigurableListableBeanFactory beanFactory = gac.getBeanFactory();
AutowiredAnnotationBeanPostProcessor autowiredAnnotationBpp = new AutowiredAnnotationBeanPostProcessor();
@@ -162,7 +162,7 @@ public class DependencyInjectionTestExecutionListener extends AbstractTestExecut
CommonAnnotationBeanPostProcessor commonAnnotationBpp = new CommonAnnotationBeanPostProcessor();
commonAnnotationBpp.setBeanFactory(beanFactory);
commonAnnotationBpp.processInjection(bean);
beanFactory.initializeBean(bean, clazz.getName() + AutowireCapableBeanFactory.ORIGINAL_INSTANCE_SUFFIX);
beanFactory.initializeBean(bean, beanName);
testContext.removeAttribute(REINJECT_DEPENDENCIES_ATTRIBUTE);
}