mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8308184: Launching java with large number of jars in classpath with java.protocol.handler.pkgs system property set can lead to StackOverflowError
Reviewed-by: mchung, alanb
This commit is contained in:
parent
4d4706967d
commit
268ec61d4f
2 changed files with 143 additions and 3 deletions
|
@ -53,11 +53,9 @@ import java.util.Arrays;
|
|||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.zip.CRC32;
|
||||
|
@ -209,7 +207,9 @@ public class URLClassPath {
|
|||
|
||||
this.unopenedUrls = unopenedUrls;
|
||||
this.path = path;
|
||||
this.jarHandler = null;
|
||||
// the application class loader uses the built-in protocol handler to avoid protocol
|
||||
// handler lookup when opening JAR files on the class path.
|
||||
this.jarHandler = new sun.net.www.protocol.jar.Handler();
|
||||
this.acc = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue