Broken applet test

Jiri Vanek jvanek at redhat.com
Sun Feb 5 05:01:12 PST 2012


This commit - http://icedtea.classpath.org/hg/icedtea-web/rev/221174bcd4ec , especially  this hunk:
--- a/netx/net/sourceforge/jnlp/Launcher.java	Fri Dec 16 12:12:18 2011 -0500
      2.2 +++ b/netx/net/sourceforge/jnlp/Launcher.java	Mon Dec 19 15:00:03 2011 -0500
      2.3 @@ -708,18 +708,19 @@
      2.4
      2.5              ThreadGroup group = Thread.currentThread().getThreadGroup();
      2.6
      2.7 +            AppletInstance appletInstance;
      2.8 +            if (cont == null)
      2.9 +                appletInstance = new AppletInstance(file, group, loader, null);
     2.10 +            else
     2.11 +                appletInstance = new AppletInstance(file, group, loader, null, cont);
     2.12 +
     2.13 +            loader.setApplication(appletInstance);
     2.14 +
     2.15              String appletName = file.getApplet().getMainClass();
     2.16              Class appletClass = loader.loadClass(appletName);
     2.17              Applet applet = (Applet) appletClass.newInstance();
     2.18 -
     2.19 -            AppletInstance appletInstance;
     2.20 -            if (cont == null)
     2.21 -                appletInstance = new AppletInstance(file, group, loader, applet);
     2.22 -            else
     2.23 -                appletInstance = new AppletInstance(file, group, loader, applet, cont);
     2.24 -
     2.25 -            loader.setApplication(appletInstance);
     2.26 -
     2.27 +            appletInstance.setApplet(applet);
     2.28 +
     2.29              setContextClassLoaderForAllThreads(appletInstance.getThreadGroup(), appletInstance.getClassLoader());
     2.30
     2.31              return appletInstance;

  have broken applet test. I have verified manually. With this patch applet lunched via jnlp (but I have not tested  embedded applets - they can be affected to!)  is causing  null pointer exception  (only in verbose mode, without it just died)
When the "bad hunk" is reverted, applet works as expected.


J.



More information about the distro-pkg-dev mailing list