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

Adam Domurad adomurad at redhat.com
Tue Apr 23 08:20:42 PDT 2013


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: axe-npe-line.patch
Type: text/x-patch
Size: 685 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130423/41a94bce/axe-npe-line.patch 


More information about the distro-pkg-dev mailing list