# HG changeset patch # User Jiri Vanek # Date 1406885144 -7200 # Node ID 247a09f2cd10718fb9a3dd47f12eb1bb70744429 # Parent 36ecc6fe6f6273ca12dbde601ba15e526796bd68 Fixed (RH1091563)- PluginAppletViewer.java: casts to (JNLPClassLoader) DID guarded by instanceof. diff -r 36ecc6fe6f62 -r 247a09f2cd10 ChangeLog --- a/ChangeLog Thu Jul 31 16:57:39 2014 -0400 +++ b/ChangeLog Fri Aug 01 11:25:44 2014 +0200 @@ -1,3 +1,8 @@ +2014-08-01 Jiri Vanek + + * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: casts to + (JNLPClassLoader) DID guarded by instanceof + 2014-07-31 Andrew Azores Add URLPermission support to SecurityDesc. This is essentially Java 8 diff -r 36ecc6fe6f62 -r 247a09f2cd10 NEWS --- a/NEWS Thu Jul 31 16:57:39 2014 -0400 +++ b/NEWS Fri Aug 01 11:25:44 2014 +0200 @@ -18,6 +18,7 @@ * NetX - PR1858: Java Console accepts multi-byte encodings - PR1859: Java Console UI improvement for lower resolutions (800*600) + - RH1091563: [abrt] icedtea-web-1.5-2.fc20: Uncaught exception java.lang.ClassCastException in method sun.applet.PluginAppletViewer$8.run() * Plugin - PR1743 - Intermittant deadlock in PluginRequestProcessor - RH1121549: coverity defects diff -r 36ecc6fe6f62 -r 247a09f2cd10 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Thu Jul 31 16:57:39 2014 -0400 +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Fri Aug 01 11:25:44 2014 +0200 @@ -829,14 +829,16 @@ PluginDebug.debug("getCachedImageRef() plugin codebase = ", codeBase); String resourceName = originalURL.substring(codeBase.length()); - JNLPClassLoader loader = (JNLPClassLoader) panel.getAppletClassLoader(); + if (panel.getAppletClassLoader() instanceof JNLPClassLoader) { + JNLPClassLoader loader = (JNLPClassLoader) panel.getAppletClassLoader(); - URL localURL = null; - if (loader.resourceAvailableLocally(resourceName)) { - url = loader.getResource(resourceName); + URL localURL = null; + if (loader.resourceAvailableLocally(resourceName)) { + url = loader.getResource(resourceName); + } + + url = localURL != null ? localURL : url; } - - url = localURL != null ? localURL : url; } PluginDebug.debug("getCachedImageRef() getting img from URL = ", url); @@ -1500,7 +1502,9 @@ appletPanels.removeElement(p); // Mark classloader unusable - ((JNLPClassLoader) cl).decrementLoaderUseCount(); + if (cl instanceof JNLPClassLoader) { + ((JNLPClassLoader) cl).decrementLoaderUseCount(); + } try { SwingUtilities.invokeAndWait(new Runnable() {