Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8289927

Add loader name accepting overload of URLClassLoader::newInstance

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • None
    • None
    • core-libs
    • None
    • Fix Understood

    Description

      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.


      Attachments

        Activity

          People

            rjernst Ryan Ernst
            chegar Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: