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.
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.