aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Domurad <[email protected]>2013-04-23 13:27:20 -0400
committerAdam Domurad <[email protected]>2013-04-23 13:27:20 -0400
commit1eab484ec7b4de98d3d3941e7643047acbbcb804 (patch)
tree8c05ac17fa4f91cb1547c752885db03d51ab1a11
parentb562f7db6e3ee3abe71d622306ab2a41473ef94e (diff)
Clean-up of dead & outdated parts of NetxPanel
-rw-r--r--ChangeLog11
-rw-r--r--netx/net/sourceforge/jnlp/NetxPanel.java33
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java2
3 files changed, 17 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index 855642c..4137be5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2013-04-23 Adam Domurad <[email protected]>
+ * netx/net/sourceforge/jnlp/NetxPanel.java
+ (exitOnFailure): Remove always-false field.
+ (NetxPanel): Remove overloaded constructor
+ (runLoader): Do not swallow LaunchException's. Remove dead
+ exitOnFailure code-path. Set applet status to APPLET_ERROR on
+ exception.
+ * plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java
+ (createPanel): Update call to NetxPanel constructor.
+
+2013-04-23 Adam Domurad <[email protected]>
+
* tests/reproducers/signed/AppContextHasJNLPClassLoader/resources/AppContextHasJNLPClassLoader.html:
Test AppContext context classloader from HTML applet
* tests/reproducers/signed/AppContextHasJNLPClassLoader/resources/AppContextHasJNLPClassLoader.jnlp:
diff --git a/netx/net/sourceforge/jnlp/NetxPanel.java b/netx/net/sourceforge/jnlp/NetxPanel.java
index e9647c8..b8e2388 100644
--- a/netx/net/sourceforge/jnlp/NetxPanel.java
+++ b/netx/net/sourceforge/jnlp/NetxPanel.java
@@ -46,7 +46,6 @@ import sun.awt.SunToolkit;
public class NetxPanel extends AppletViewerPanel implements SplashController {
private final PluginParameters parameters;
private PluginBridge bridge = null;
- private boolean exitOnFailure = true;
private AppletInstance appInst = null;
private SplashController splashController;
private boolean appletAlive;
@@ -79,13 +78,6 @@ public class NetxPanel extends AppletViewerPanel implements SplashController {
uKeyToTG.put(uniqueKey, tg);
}
}
- }
-
- // overloaded constructor, called when initialized via plugin
- public NetxPanel(URL documentURL, PluginParameters params,
- boolean exitOnFailure) {
- this(documentURL, params);
- this.exitOnFailure = exitOnFailure;
this.appletAlive = true;
}
@@ -117,28 +109,12 @@ public class NetxPanel extends AppletViewerPanel implements SplashController {
dispatchAppletEvent(APPLET_LOADING, null);
status = APPLET_LOAD;
- Launcher l = new Launcher(exitOnFailure);
+ Launcher l = new Launcher(false);
- try {
- appInst = (AppletInstance) l.launch(bridge, this);
- } catch (LaunchException e) {
- // Assume user has indicated he does not trust the
- // applet.
- if (exitOnFailure)
- System.exit(1);
- }
+ // May throw LaunchException:
+ appInst = (AppletInstance) l.launch(bridge, this);
applet = appInst.getApplet();
- //On the other hand, if you create an applet this way, it'll work
- //fine. Note that you might to open visibility in sun.applet.AppletPanel
- //for this to work (the loader field, and getClassLoader).
- //loader = getClassLoader(getCodeBase(), getClassLoaderCacheKey());
- //applet = createApplet(loader);
-
- // This shows that when using NetX's JNLPClassLoader, keyboard input
- // won't make it to the applet, whereas using sun.applet.AppletClassLoader
- // works just fine.
-
if (applet != null) {
// Stick it in the frame
applet.setStub(this);
@@ -149,12 +125,13 @@ public class NetxPanel extends AppletViewerPanel implements SplashController {
}
} catch (Exception e) {
this.appletAlive = false;
+ status = APPLET_ERROR;
e.printStackTrace();
replaceSplash(SplashUtils.getErrorSplashScreen(getWidth(), getHeight(), e));
} finally {
// PR1157: This needs to occur even in the case of an exception
// so that the applet's event listeners are signaled.
- // Once PluginAppletViewer.AppletEventListener is signaled PluginAppletViewer it can properly stop waiting
+ // Once PluginAppletViewer.AppletEventListener is signaled PluginAppletViewer can properly stop waiting
// in PluginAppletViewer.waitForAppletInit
dispatchAppletEvent(APPLET_LOADING_COMPLETED, null);
}
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java b/plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java
index 122313e..961df66 100644
--- a/plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java
@@ -85,7 +85,7 @@ class PluginAppletPanelFactory {
final PluginParameters params) {
final NetxPanel panel = AccessController.doPrivileged(new PrivilegedAction<NetxPanel>() {
public NetxPanel run() {
- NetxPanel panel = new NetxPanel(doc, params, false);
+ NetxPanel panel = new NetxPanel(doc, params);
NetxPanel.debug("Using NetX panel");
PluginDebug.debug(params.toString());
return panel;