Skip to content

Commit

Permalink
Merge branch '3.4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Feb 27, 2025
2 parents 96d91aa + cbf9cb0 commit 8eb8d3f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2025 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 @@ -29,7 +29,6 @@

import org.springframework.core.io.UrlResource;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;

/**
* Contains {@code @Configuration} import candidates, usually auto-configurations.
Expand Down Expand Up @@ -74,8 +73,7 @@ public List<String> getCandidates() {
* Every line contains the full qualified name of the candidate class. Comments are
* supported using the # character.
* @param annotation annotation to load
* @param classLoader class loader to use for loading, or {@code null} to use the
* {@link ClassUtils#getDefaultClassLoader() default class loader}
* @param classLoader class loader to use for loading
* @return list of names of annotated classes
*/
public static ImportCandidates load(Class<?> annotation, ClassLoader classLoader) {
Expand All @@ -93,7 +91,7 @@ public static ImportCandidates load(Class<?> annotation, ClassLoader classLoader

private static ClassLoader decideClassloader(ClassLoader classLoader) {
if (classLoader == null) {
return ClassUtils.getDefaultClassLoader();
return ImportCandidates.class.getClassLoader();
}
return classLoader;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class ImportCandidatesTests {
""")
void loadReadsFromClasspathFile() {
ImportCandidates candidates = ImportCandidates.load(TestAnnotation.class, null);
ImportCandidates candidates = ImportCandidates.load(TestAnnotation.class,
Thread.currentThread().getContextClassLoader());
assertThat(candidates).containsExactly("class1", "class2", "class3");
}

Expand Down

0 comments on commit 8eb8d3f

Please sign in to comment.