Skip to content

Commit c803ad7

Browse files
committed
ConfigurationClassParser consistently uses ClassUtils.forName
Issue: SPR-17253
1 parent 84ec382 commit c803ad7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@
9090
* another using the {@link Import} annotation).
9191
*
9292
* <p>This class helps separate the concern of parsing the structure of a Configuration
93-
* class from the concern of registering BeanDefinition objects based on the
94-
* content of that model (with the exception of {@code @ComponentScan} annotations which
95-
* need to be registered immediately).
93+
* class from the concern of registering BeanDefinition objects based on the content of
94+
* that model (with the exception of {@code @ComponentScan} annotations which need to be
95+
* registered immediately).
9696
*
9797
* <p>This ASM-based implementation avoids reflection and eager class loading in order to
9898
* interoperate effectively with lazy class loading in a Spring ApplicationContext.
@@ -994,7 +994,7 @@ public Collection<SourceClass> getAnnotationAttributes(String annType, String at
994994
private SourceClass getRelated(String className) throws IOException {
995995
if (this.source instanceof Class) {
996996
try {
997-
Class<?> clazz = ((Class<?>) this.source).getClassLoader().loadClass(className);
997+
Class<?> clazz = ClassUtils.forName(className, ((Class<?>) this.source).getClassLoader());
998998
return asSourceClass(clazz);
999999
}
10001000
catch (ClassNotFoundException ex) {

0 commit comments

Comments
 (0)