Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Jan 5, 2024
1 parent 79b0d71 commit 580d9f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
Expand Down Expand Up @@ -517,9 +517,9 @@ public PropertyValues postProcessProperties(PropertyValues pvs, Object bean, Str
}

/**
* 'Native' processing method for direct calls with an arbitrary target instance,
* resolving all of its fields and methods which are annotated with one of the
* configured 'autowired' annotation types.
* <em>Native</em> processing method for direct calls with an arbitrary target
* instance, resolving all of its fields and methods which are annotated with
* one of the configured 'autowired' annotation types.
* @param bean the target instance to process
* @throws BeanCreationException if autowiring failed
* @see #setAutowiredAnnotationTypes(Set)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private void injectDependenciesInAotMode(TestContext testContext) throws Excepti
}

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();
Expand All @@ -162,7 +162,7 @@ private void injectDependenciesInAotMode(TestContext testContext) throws Excepti
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);
}

Expand Down

0 comments on commit 580d9f8

Please sign in to comment.