Add loader name accepting overload of URLClassLoader::newInstance

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • Fix Understood

      In Java 9 class loaders got a descriptive `name`. The name is typically useful for debugging and diagnostic purposes, e.g. showing up in stack traces.

      java.net.URLClassLoader was retrofitted in Java 9 with overloaded constructors that accept a `name`, so that instances of these loaders can have descriptive names. However, the static factory methods, `URLClassLoader::newInstance`, do not have overloads that take a `name`. These factories have different security manager permission checks and implementation, when compared to the constructors.

      This issue has been filed to evaluate the possibility of adding an overloaded `newInstance` that takes a `name`, so that applications can simply use this (and its concrete implementation) rather than subclassing URLClassLoader directly.


            Assignee:
            Ryan Ernst
            Reporter:
            Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: