changeset 111:c16a09791e54

Handle case where source or source.getLocation() is null when checking for system jars
author Deepak Bhole <dbhole@redhat.com>
date Sat, 02 Apr 2011 18:00:21 -0400
parents a5e96f8affa6
children de51c15ae614
files ChangeLog netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Apr 02 17:59:32 2011 -0400
+++ b/ChangeLog	Sat Apr 02 18:00:21 2011 -0400
@@ -1,3 +1,8 @@
+2011-03-01  Omair Majid  <omajid@redhat.com>
+
+	 * netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java (isSystemJar): Check
+	 for nulls.
+
 2011-02-23  Omair Majid  <omajid@redhat.com>
 
 	RH677772: NoSuchAlgorithmException using SSL/TLS in javaws
--- a/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java	Sat Apr 02 17:59:32 2011 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java	Sat Apr 02 18:00:21 2011 -0400
@@ -92,6 +92,10 @@
      * it's part of the JRE.
      */
     private boolean isSystemJar(CodeSource source) {
+        if (source == null || source.getLocation() == null) {
+            return false;
+        }
+
         // anything in JRE/lib/ext is a system jar and has full permissions
         String sourceProtocol = source.getLocation().getProtocol();
         String sourcePath = source.getLocation().getPath();