Merge branch '3.2.x'

Closes gh-40166
This commit is contained in:
Scott Frederick
2024-04-03 16:32:13 -05:00
23 changed files with 76 additions and 78 deletions

View File

@@ -116,8 +116,8 @@ final class ModifiedClassPathClassLoader extends URLClassLoader {
private static Collection<AnnotatedElement> getAnnotatedElements(Object[] array) {
Set<AnnotatedElement> result = new LinkedHashSet<>();
for (Object item : array) {
if (item instanceof AnnotatedElement) {
result.add((AnnotatedElement) item);
if (item instanceof AnnotatedElement annotatedElement) {
result.add(annotatedElement);
}
else if (ObjectUtils.isArray(item)) {
result.addAll(getAnnotatedElements(ObjectUtils.toObjectArray(item)));