[rfc][icedtea-web] Fix potential NPE by removing line PluginAppletViewer.java:1499

Jiri Vanek jvanek at redhat.com
Tue Apr 23 23:02:43 PDT 2013


On 04/23/2013 05:20 PM, Adam Domurad wrote:
> During shutdown I got:
>
> Exception in thread "Thread-14" java.lang.NullPointerException
> at sun.applet.PluginAppletViewer$7.run(PluginAppletViewer.java:1499)
> at java.lang.Thread.run(Thread.java:722)
>
> For the line here in appletClose():
>
> ClassLoader cl = p.applet.getClass().getClassLoader();
>
> // Since we want to deal with JNLPClassLoader, extract it if this
> // is a codebase loader
> if (cl instanceof JNLPClassLoader.CodeBaseClassLoader)
> cl = ((JNLPClassLoader.CodeBaseClassLoader) cl).getParentJNLPClassLoader();
>
> ThreadGroup tg = ((JNLPClassLoader) cl).getApplication().getThreadGroup();
> ^^^^^^^^^^^^^^^^^^^^
> This ThreadGroup grab isn't needed at all (unused), and getApplication can't be guaranteed to be set-up at this point, I'm in favour of axing it.
>
> -Adam

sounds good to me.



More information about the distro-pkg-dev mailing list