mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-05-04 05:01:06 +01:00
Update javadoc of LaunchedURLClassLoader to describe delegation model
Closes gh-3864
This commit is contained in:
+14
@@ -62,6 +62,13 @@ public class LaunchedURLClassLoader extends URLClassLoader {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the resource with the given {@code name}.
|
||||
* <p>
|
||||
* Unlike a standard {@link ClassLoader}, this method will first search the root class
|
||||
* loader. If the resource is not found, this method will call
|
||||
* {@link #findResource(String)}.
|
||||
*/
|
||||
@Override
|
||||
public URL getResource(String name) {
|
||||
URL url = null;
|
||||
@@ -96,6 +103,13 @@ public class LaunchedURLClassLoader extends URLClassLoader {
|
||||
return getURLs().length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the resources with the given {@code name}.
|
||||
* <p>
|
||||
* Returns a combination of the resources found by {@link #findResources(String)} and
|
||||
* from {@link ClassLoader#getResources(String) getResources(String)} on the root
|
||||
* class loader, if any.
|
||||
*/
|
||||
@Override
|
||||
public Enumeration<URL> getResources(String name) throws IOException {
|
||||
if (this.rootClassLoader == null) {
|
||||
|
||||
Reference in New Issue
Block a user