URLClassLoader constructors and newInstance() calls throw a NullPointerException when the array contains a null element

The java.net.URLClassLoader constructors and URLClassLoader.newInstance() had no specified behavior when initializing with an array that contains a null element prior to Java SE 11. In Java 11 the behavior was changed to throw a java.lang.NullPointerException if a null element is detected within the array. Changes might be needed to protect against uncaught exceptions.

For additional information about the java.net.URLClassLoader class, see the Class java.net.URLClassLoader Java documentation.

For more information on changes in JDK 11, see Release Notes in JDK 11.