mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '1.4.x' into 1.5.x
This commit is contained in:
commit
3a2d9e31ff
@ -27,6 +27,7 @@ import java.util.Enumeration;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
import org.springframework.boot.loader.jar.Handler;
|
||||
import org.springframework.lang.UsesJava7;
|
||||
|
||||
/**
|
||||
* {@link ClassLoader} used by the {@link Launcher}.
|
||||
@ -38,7 +39,7 @@ import org.springframework.boot.loader.jar.Handler;
|
||||
public class LaunchedURLClassLoader extends URLClassLoader {
|
||||
|
||||
static {
|
||||
ClassLoader.registerAsParallelCapable();
|
||||
performParallelCapableRegistration();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -186,4 +187,14 @@ public class LaunchedURLClassLoader extends URLClassLoader {
|
||||
}
|
||||
}
|
||||
|
||||
@UsesJava7
|
||||
private static void performParallelCapableRegistration() {
|
||||
try {
|
||||
ClassLoader.registerAsParallelCapable();
|
||||
}
|
||||
catch (NoSuchMethodError ex) {
|
||||
// Running on Java 6. Continue.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user