# HG changeset patch # User Omair Majid # Date 1301079840 14400 # Node ID e4336b504f8aebd2619a625375f75baea27473c8 # Parent 77b802f946bbdd186ddea2187545a7d77059cd71 Backport fix for PR542 2010-11-01 Deepak Bhole PR542: Plugin fails with NPE on http://www.openprocessing.org/visuals/iframe.php?visualID=2615 * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (initializeResources): If cacheFile is null (JAR couldn't be downloaded), try to continue, rather than allowing the exception to cause an abort. * NEWS: Updated. diff -r 77b802f946bb -r e4336b504f8a ChangeLog --- a/ChangeLog Mon Mar 07 17:22:45 2011 +0100 +++ b/ChangeLog Fri Mar 25 15:04:00 2011 -0400 @@ -1,3 +1,12 @@ +2010-11-01 Deepak Bhole + + PR542: Plugin fails with NPE on + http://www.openprocessing.org/visuals/iframe.php?visualID=2615 + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): If cacheFile is null (JAR couldn't be downloaded), + try to continue, rather than allowing the exception to cause an abort. + * NEWS: Updated. + 2011-03-07 Pavel Tisnovsky * Makefile.am: Add new patch. diff -r 77b802f946bb -r e4336b504f8a NEWS --- a/NEWS Mon Mar 07 17:22:45 2011 +0100 +++ b/NEWS Fri Mar 25 15:04:00 2011 -0400 @@ -14,6 +14,8 @@ - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size - S6980392, PR642: simple correction in testcase, added missing bracket +* Plugin + - PR542: Plugin fails with NPE on http://www.openprocessing.org/visuals/iframe.php?visualID=2615 New in release 1.9.7 (2011-02-15): diff -r 77b802f946bb -r e4336b504f8a netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Mar 07 17:22:45 2011 +0100 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Mar 25 15:04:00 2011 -0400 @@ -424,7 +424,15 @@ for (JARDesc jarDesc: file.getResources().getJARs()) { try { - URL location = tracker.getCacheFile(jarDesc.getLocation()).toURI().toURL(); + File cachedFile = tracker.getCacheFile(jarDesc.getLocation()); + + if (cachedFile == null) { + System.err.println("JAR " + jarDesc.getLocation() + " not found. Continuing."); + continue; // JAR not found. Keep going. + } + + URL location = cachedFile.toURL(); + SecurityDesc jarSecurity = file.getSecurity(); if (file instanceof PluginBridge) {