# HG changeset patch # User Deepak Bhole # Date 1232649409 18000 # Node ID 15437352b69c92ae06fd520f64593b752b336cef # Parent 0507a324ec22080f061b0357e707d5e4f7ae3b84 - Fix bug that caused applet to crash if an optional class was not found (happened due to a CFE being thrown when a site sends redirected page content instead of 404 upon a class request). RH BZ: 477351 diff -r 0507a324ec22 -r 15437352b69c ChangeLog --- a/ChangeLog Thu Jan 22 17:55:26 2009 +0000 +++ b/ChangeLog Thu Jan 22 13:36:49 2009 -0500 @@ -1,3 +1,11 @@ +2009-01-22 Deepak Bhole + + * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java: Use + Hashtable to store classloaders, instead of HashMap (values cannot be + null in HashTable). + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Catch CFE in + addition to CNFE. + 2009-01-22 Andrew Haley * ports/hotspot/src/cpu/zero/vm/stack_zero.hpp (class diff -r 0507a324ec22 -r 15437352b69c plugin/icedtea/sun/applet/PluginAppletSecurityContext.java --- a/plugin/icedtea/sun/applet/PluginAppletSecurityContext.java Thu Jan 22 17:55:26 2009 +0000 +++ b/plugin/icedtea/sun/applet/PluginAppletSecurityContext.java Thu Jan 22 13:36:49 2009 -0500 @@ -55,6 +55,7 @@ import java.security.ProtectionDomain; import java.util.ArrayList; import java.util.HashMap; +import java.util.Hashtable; import java.util.List; import net.sourceforge.jnlp.runtime.JNLPRuntime; @@ -224,7 +225,7 @@ public class PluginAppletSecurityContext { - public static HashMap classLoaders = new HashMap(); + public static Hashtable classLoaders = new Hashtable(); // FIXME: make private public PluginObjectStore store = new PluginObjectStore(); diff -r 0507a324ec22 -r 15437352b69c rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Jan 22 17:55:26 2009 +0000 +++ b/rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Jan 22 13:36:49 2009 -0500 @@ -775,6 +775,7 @@ return loaders[i].findClass(name); } catch(ClassNotFoundException ex) { } + catch(ClassFormatError cfe) {} } throw new ClassNotFoundException(name);