Skip to content

Commit

Permalink
Merge pull request #31798 from aoyvx
Browse files Browse the repository at this point in the history
* pr/31798:
  Update copyright year of changed file
  Use Bean ClassLoader consistently to resolve class names

Closes gh-31798
  • Loading branch information
snicoll committed Jul 20, 2022
2 parents ac65835 + 585a57b commit 043354f
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 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 @@ -100,7 +100,7 @@ protected Collection<String> loadFactoryNames(Class<?> source) {
@Override
protected Set<String> getExclusions(AnnotationMetadata metadata, AnnotationAttributes attributes) {
Set<String> exclusions = new LinkedHashSet<>();
Class<?> source = ClassUtils.resolveClassName(metadata.getClassName(), null);
Class<?> source = ClassUtils.resolveClassName(metadata.getClassName(), getBeanClassLoader());
for (String annotationName : ANNOTATION_NAMES) {
AnnotationAttributes merged = AnnotatedElementUtils.getMergedAnnotationAttributes(source, annotationName);
Class<?>[] exclude = (merged != null) ? merged.getClassArray("exclude") : null;
Expand All @@ -124,7 +124,7 @@ protected Set<String> getExclusions(AnnotationMetadata metadata, AnnotationAttri

protected final Map<Class<?>, List<Annotation>> getAnnotations(AnnotationMetadata metadata) {
MultiValueMap<Class<?>, Annotation> annotations = new LinkedMultiValueMap<>();
Class<?> source = ClassUtils.resolveClassName(metadata.getClassName(), null);
Class<?> source = ClassUtils.resolveClassName(metadata.getClassName(), getBeanClassLoader());
collectAnnotations(source, annotations, new HashSet<>());
return Collections.unmodifiableMap(annotations);
}
Expand Down

0 comments on commit 043354f

Please sign in to comment.