Potential StackOverflowError involves with URLClassPath

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • generic
    • generic

      We were testing some jdk.internal.loader.ClassLoaders changes and ran into LargeClasspathWithPkgPrefix.java jtreg test failure (java.lang.StackOverflowError), if the following constructor is used instead of URLClassPath(String, boolean) in the ClassLoaders static initializer:

      public URLClassPath(URL[] urls,
                              URLStreamHandlerFactory factory,
                              @SuppressWarnings("removal") AccessControlContext acc);

      [~cushon] pointed out to https://bugs.openjdk.org/browse/JDK-8308184 and suggested the fix from https://github.com/openjdk/jdk21u/pull/11/files should be applied in URLClassPath(URL[], URLStreamHandlerFactory, AccessControlContext acc) as well. I think that's the right thing to do.

            Assignee:
            Jiangli Zhou
            Reporter:
            Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: