mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8273401: Disable JarIndex support in URLClassPath
Reviewed-by: dfuchs, lancea, alanb, mchung
This commit is contained in:
parent
5ec1cdcaf3
commit
7700b25460
3 changed files with 11 additions and 4 deletions
|
@ -90,6 +90,7 @@ public class URLClassPath {
|
|||
private static final boolean DISABLE_ACC_CHECKING;
|
||||
private static final boolean DISABLE_CP_URL_CHECK;
|
||||
private static final boolean DEBUG_CP_URL_CHECK;
|
||||
private static final boolean ENABLE_JAR_INDEX;
|
||||
|
||||
static {
|
||||
Properties props = GetPropertyAction.privilegedGetProperties();
|
||||
|
@ -109,6 +110,9 @@ public class URLClassPath {
|
|||
// the check is not disabled).
|
||||
p = props.getProperty("jdk.net.URLClassPath.showIgnoredClassPathEntries");
|
||||
DEBUG_CP_URL_CHECK = p != null ? p.equals("true") || p.isEmpty() : false;
|
||||
|
||||
p = props.getProperty("jdk.net.URLClassPath.enableJarIndex");
|
||||
ENABLE_JAR_INDEX = p != null ? p.equals("true") || p.isEmpty() : false;
|
||||
}
|
||||
|
||||
/* The original search path of URLs. */
|
||||
|
@ -763,8 +767,10 @@ public class URLClassPath {
|
|||
System.err.println("Opening " + csu);
|
||||
Thread.dumpStack();
|
||||
}
|
||||
|
||||
jar = getJarFile(csu);
|
||||
if (!ENABLE_JAR_INDEX) {
|
||||
return null;
|
||||
}
|
||||
index = JarIndex.getJarIndex(jar);
|
||||
if (index != null) {
|
||||
String[] jarfiles = index.getJarFiles();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue