[icedtea-web] PluginAppletViewer.java:1625 - Can "cl" be null?

Adam Domurad adomurad at redhat.com
Mon Jun 3 08:28:46 PDT 2013


On 05/31/2013 08:32 AM, Thomas Meyer wrote:
> Hi,
>
> two questions/remarks:
>
> 1.) while debugging bug 1465 I hit a constellation where "cl" was null?
> Is this something that could happen in reality or did I fumble to much
> with the debugger?
>
> --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Mon Jul 09 16:22:05 2012 -0400
> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Fri May 31 12:49:17 2013 +0200
> @@ -1625,9 +1625,10 @@
>
>                   appletShutdown(p);
>                   appletPanels.removeElement(p);
> -
> +
>                   // Mark classloader unusable
> -                ((JNLPClassLoader) cl).decrementLoaderUseCount();
> +                if(cl != null)
> +                    ((JNLPClassLoader) cl).decrementLoaderUseCount();
>
>                   try {
>                       SwingUtilities.invokeAndWait(new Runnable() {
>
> 2.) While debugging bug 1465 I hit a funny constellation where the
> underlying "juniper SSL connection" timed out and so in
> net.sourceforge.jnlp.cache.ResourceTracker.downloadResource(Resource) I
> did just receive an HTML file with the message, that my current session
> timed out.
> This HTML file was written to the cache directory, as "JICA-foo.jar". Is
> the missing check for "Content-Type" in this method intentional?
>
>
>

1.)
Hi Thomas, I cannot think of any case where this could be null. If you 
have reproducing steps we can look into it, it would indicate something 
odd happening I think. (Side rant: Nullable-by-default is evil :-( )

2.)
While I cannot speak specifically about this method, generally we do not 
reject things based on stuff like 'Content-Type' to be as lenient as 
possible for eg non-compliant servers.

Cheers,
-Adam



More information about the distro-pkg-dev mailing list