# HG changeset patch # User Omair Majid # Date 1301081806 14400 # Node ID c4b749a831039777faf9c6cbc281f7ce1180c748 # Parent 015d29e3b82a388bdb73b626ada3d89fd0a3e4f9 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 015d29e3b82a -r c4b749a83103 ChangeLog --- a/ChangeLog Fri Mar 25 13:25:46 2011 +0100 +++ b/ChangeLog Fri Mar 25 15:36:46 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-25 Xerxes Ranby Mark Wielaard diff -r 015d29e3b82a -r c4b749a83103 NEWS --- a/NEWS Fri Mar 25 13:25:46 2011 +0100 +++ b/NEWS Fri Mar 25 15:36:46 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 - PR632: patches/security/20110215/6878713.patch breaks shark zero build +* Plugin + - PR542: Plugin fails with NPE on http://www.openprocessing.org/visuals/iframe.php?visualID=2615 New in release 1.8.7 (2011-02-15): diff -r 015d29e3b82a -r c4b749a83103 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Mar 25 13:25:46 2011 +0100 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Mar 25 15:36:46 2011 -0400 @@ -424,7 +424,14 @@ 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) {