[jdk11u-dev] RFR: 8308184: Launching java with large number of jars in classpath with java.protocol.handler.pkgs system property set can lead to StackOverflowError

Amit Kumar amitkumar at openjdk.org
Fri Jun 7 18:09:18 UTC 2024


On Fri, 7 Jun 2024 10:40:23 GMT, Sruthy Jayan <duke at openjdk.org> wrote:

> This is the backport of the issue : [JDK-8308184](https://bugs.openjdk.org/browse/JDK-8308184)
> 
> Launching java with large number of jars in classpath with java.protocol.handler.pkgs system property set can lead to StackOverflowError

Changes requested by amitkumar (Author).

src/java.base/share/classes/jdk/internal/loader/URLClassPath.java line 211:

> 209:         this.unopenedUrls = unopenedUrls;
> 210:         this.path = path;
> 211:         // the application class loader uses the built-in protocol handler to avoid protocol

It should have been a clean backport. Please remove these two imports from this file: 


import java.util.HashSet;
import java.util.Set;


Also please mention about testing you have done for this patch !!

-------------

PR Review: https://git.openjdk.org/jdk11u-dev/pull/2749#pullrequestreview-2105116108
PR Review Comment: https://git.openjdk.org/jdk11u-dev/pull/2749#discussion_r1631540601


More information about the jdk-updates-dev mailing list