From c571fe4ca9753affefee9be384868630b24a479f Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Fri, 27 May 2011 12:45:05 -0400 Subject: PR724: Possible NullPointerException in JNLPClassLoader.getClassPathsFromManifest 2011-05-27 Omair Majid * NEWS: Update. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (getClassPathsFromManifest): Check for possible nulls and empty strings. --- ChangeLog | 6 ++++++ NEWS | 1 + netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 3 +++ 3 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 34926c2..42e22fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-05-27 Omair Majid + + * NEWS: Update. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (getClassPathsFromManifest): Check for possible nulls and empty strings. + 2011-05-26 Andrew Su * NEWS: Update. diff --git a/NEWS b/NEWS index c105686..2a3816e 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ New in release 1.1 (2011-XX-XX): - PR497: Mercurial revision detection not very reliable - PR638: JNLPClassLoader.loadClass(String name) can return null - RH677772: NoSuchAlgorithmException using SSL/TLS in javaws + - PR724: Possible NullPointerException in JNLPClassLoader.getClassPathsFromManifest * NetX - Use Firefox's proxy settings if possible - The user's default browser (determined from xdg-open or $BROWSER) is used diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java index 27c0fcd..27e1538 100644 --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java @@ -1375,6 +1375,9 @@ public class JNLPClassLoader extends URLClassLoader { 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) { -- cgit v1.2.3