File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
spring-boot-project/spring-boot/src/main/java/org/springframework/boot Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2012-2025 the original author or authors.
2
+ * Copyright 2012-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -480,7 +480,7 @@ private <T> List<T> getSpringFactoriesInstances(Class<T> type) {
480
480
}
481
481
482
482
private <T > List <T > getSpringFactoriesInstances (Class <T > type , ArgumentResolver argumentResolver ) {
483
- return SpringFactoriesLoader .forDefaultResourceLocation (getClassLoader (null )).load (type , argumentResolver );
483
+ return SpringFactoriesLoader .forDefaultResourceLocation (getClassLoader ()).load (type , argumentResolver );
484
484
}
485
485
486
486
private ConfigurableEnvironment getOrCreateEnvironment () {
@@ -715,11 +715,10 @@ public ResourceLoader getResourceLoader() {
715
715
* @return a ClassLoader (never null)
716
716
*/
717
717
public ClassLoader getClassLoader () {
718
- return getClassLoader (ClassUtils .getDefaultClassLoader ());
719
- }
720
-
721
- private ClassLoader getClassLoader (ClassLoader fallback ) {
722
- return (this .resourceLoader != null ) ? this .resourceLoader .getClassLoader () : fallback ;
718
+ if (this .resourceLoader != null ) {
719
+ return this .resourceLoader .getClassLoader ();
720
+ }
721
+ return ClassUtils .getDefaultClassLoader ();
723
722
}
724
723
725
724
/**
You can’t perform that action at this time.
0 commit comments