diff options
author | Denis Lila <[email protected]> | 2011-04-29 16:58:05 -0400 |
---|---|---|
committer | Denis Lila <[email protected]> | 2011-04-29 16:58:05 -0400 |
commit | 56d85fafd578e28fc17211d28f4f0a701192e789 (patch) | |
tree | 163144e2f7b4a7dcf42d38e35decc0ece28a03fb /netx/net/sourceforge/jnlp/Launcher.java | |
parent | d11445dcf1ad408836766709c47f47ef2aec1d31 (diff) |
Fix appcontext related plugin bugs.
Diffstat (limited to 'netx/net/sourceforge/jnlp/Launcher.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/Launcher.java | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/netx/net/sourceforge/jnlp/Launcher.java b/netx/net/sourceforge/jnlp/Launcher.java index 2c0af48..988650b 100644 --- a/netx/net/sourceforge/jnlp/Launcher.java +++ b/netx/net/sourceforge/jnlp/Launcher.java @@ -32,7 +32,6 @@ import java.util.jar.JarFile; import net.sourceforge.jnlp.cache.CacheUtil; import net.sourceforge.jnlp.cache.UpdatePolicy; -import net.sourceforge.jnlp.runtime.AppThreadGroup; import net.sourceforge.jnlp.runtime.AppletInstance; import net.sourceforge.jnlp.runtime.ApplicationInstance; import net.sourceforge.jnlp.runtime.JNLPClassLoader; @@ -702,7 +701,7 @@ public class Launcher { throw new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later"); } - AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup(); + ThreadGroup group = Thread.currentThread().getThreadGroup(); String appletName = file.getApplet().getMainClass(); @@ -718,7 +717,6 @@ public class Launcher { else appletInstance = new AppletInstance(file, group, loader, applet, cont); - group.setApplication(appletInstance); loader.setApplication(appletInstance); setContextClassLoaderForAllThreads(appletInstance.getThreadGroup(), appletInstance.getClassLoader()); @@ -765,10 +763,9 @@ public class Launcher { protected ApplicationInstance createApplication(JNLPFile file) throws LaunchException { try { JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy); - AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup(); + ThreadGroup group = Thread.currentThread().getThreadGroup(); ApplicationInstance app = new ApplicationInstance(file, group, loader); - group.setApplication(app); loader.setApplication(app); return app; @@ -784,16 +781,16 @@ public class Launcher { * then this method simply returns the existing ThreadGroup. The applet * ThreadGroup has to be created at an earlier point in the applet code. */ - protected AppThreadGroup createThreadGroup(JNLPFile file) { - AppThreadGroup appThreadGroup = null; + protected ThreadGroup createThreadGroup(JNLPFile file) { + ThreadGroup tg = null; if (file instanceof PluginBridge) { - appThreadGroup = (AppThreadGroup) Thread.currentThread().getThreadGroup(); + tg = Thread.currentThread().getThreadGroup(); } else { - appThreadGroup = new AppThreadGroup(mainGroup, file.getTitle()); + tg = new ThreadGroup(mainGroup, file.getTitle()); } - return appThreadGroup; + return tg; } /** |