[icedtea-web] RFC: PR724: Possible NullPointerException in JNLPClassLoader.getClassPathsFromManifest
Deepak Bhole
dbhole at redhat.com
Fri May 27 08:30:07 PDT 2011
* Omair Majid <omajid at redhat.com> [2011-05-27 11:26]:
> Hi,
>
> The attached patch fixes PR724. It just adds more checking to handle
> nulls gracefully. Okay to commit?
>
> ChangeLog:
> 2011-05-27 Omair Majid <omajid at redhat.com>
>
> * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
> (getClasspathsFromManifest): Handle nulls or empty strings properly.
>
> Cheers,
> Omair
Patch looks good to me. Okay for HEAD and branches (1.0 and 1.1).
Thanks,
Deepak
> diff -r 85cf7fb25642 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
> --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue May 10 11:59:47 2011 -0400
> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon May 16 13:25:30 2011 -0400
> @@ -1375,6 +1375,9 @@
> if (mf != null) {
> // extract the Class-Path entries from the manifest and split them
> String classpath = mf.getMainAttributes().getValue("Class-Path");
> + if (classpath == null || classpath.trim().length() == 0) {
> + return result;
> + }
> String[] paths = classpath.split(" +");
> for (String path : paths) {
> if (path.trim().length() == 0) {
More information about the distro-pkg-dev
mailing list