Skip to content

Commit 043354f

Browse files
committed
Merge pull request #31798 from aoyvx
* pr/31798: Update copyright year of changed file Use Bean ClassLoader consistently to resolve class names Closes gh-31798
2 parents ac65835 + 585a57b commit 043354f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelector.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -100,7 +100,7 @@ protected Collection<String> loadFactoryNames(Class<?> source) {
100100
@Override
101101
protected Set<String> getExclusions(AnnotationMetadata metadata, AnnotationAttributes attributes) {
102102
Set<String> exclusions = new LinkedHashSet<>();
103-
Class<?> source = ClassUtils.resolveClassName(metadata.getClassName(), null);
103+
Class<?> source = ClassUtils.resolveClassName(metadata.getClassName(), getBeanClassLoader());
104104
for (String annotationName : ANNOTATION_NAMES) {
105105
AnnotationAttributes merged = AnnotatedElementUtils.getMergedAnnotationAttributes(source, annotationName);
106106
Class<?>[] exclude = (merged != null) ? merged.getClassArray("exclude") : null;
@@ -124,7 +124,7 @@ protected Set<String> getExclusions(AnnotationMetadata metadata, AnnotationAttri
124124

125125
protected final Map<Class<?>, List<Annotation>> getAnnotations(AnnotationMetadata metadata) {
126126
MultiValueMap<Class<?>, Annotation> annotations = new LinkedMultiValueMap<>();
127-
Class<?> source = ClassUtils.resolveClassName(metadata.getClassName(), null);
127+
Class<?> source = ClassUtils.resolveClassName(metadata.getClassName(), getBeanClassLoader());
128128
collectAnnotations(source, annotations, new HashSet<>());
129129
return Collections.unmodifiableMap(annotations);
130130
}

0 commit comments

Comments
 (0)