Relates :
|
|
Relates :
|
|
Relates :
|
URLClassLoader is not describes behavior of several methods in case null arguments. This methods are: public URLClassLoader(URL[] urls) URLClassLoader(URL[] urls, ClassLoader parent) URLClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory) protected void addURL(URL url) protected Class<?> findClass(String name) throws ClassNotFoundException protected Package definePackage(String name, Manifest man, URL url) throws IllegalArgumentException public URL findResource(String name) public Enumeration<URL> findResources(String name) throws IOException protected PermissionCollection getPermissions(CodeSource codesource) public static URLClassLoader newInstance(URL[] urls, ClassLoader parent) public static URLClassLoader newInstance(URL[] urls) From "Requirements for Writing Java API Specifications": For each reference type argument, specify the behavior when null is passed in. If possible, document the general null argument behavior at the package or class level, such as causing a java.lang.NullPointerException to be thrown. Deviations from this behavior can then be documented at the method level. See: http://java.sun.com/j2se/javadoc/writingapispecs/index.html#method I'm searching for such documentations and found nothing. URLClassLoader itself, as well as methods documentation and package (java.net) documentation all hasn't such information. So, we can assume that all methods will feel O.K. in case null argument(s). That most likely isn't true.
|