/hg/icedtea-web: Removed dual panel in panel misleading declarat...
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Tue Jun 16 09:29:10 UTC 2015
changeset 78b33f42aa24 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=78b33f42aa24
author: Jiri Vanek <jvanek at redhat.com>
date: Tue Jun 16 11:29:01 2015 +0200
Removed dual panel in panel misleading declaration in AppTrustWarningDialog
* netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java: no longer extends SecurityDdialog. Static methods are now only simple factory methods creating concrete extensions of AppTrustWarningPanel * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java: now extends SecurityDialogPanel instead of JPanel. Removed SecurityDialog parent, now inherited, added call to super with securityDialog parameter
diffstat:
ChangeLog | 10 +++
netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java | 26 +++------
netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java | 10 +--
3 files changed, 22 insertions(+), 24 deletions(-)
diffs (109 lines):
diff -r e2583f1178ce -r 78b33f42aa24 ChangeLog
--- a/ChangeLog Tue Jun 16 10:49:03 2015 +0200
+++ b/ChangeLog Tue Jun 16 11:29:01 2015 +0200
@@ -1,3 +1,13 @@
+2015-06-16 Jiri Vanek <jvanek at redhat.com>
+
+ Removed dual panel in panel misleading declaration in AppTrustWarningDialog
+ * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java:
+ no longer extends SecurityDdialog. Static methods are now only simple factory methods
+ creating concrete extensions of AppTrustWarningPanel
+ * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java:
+ now extends SecurityDialogPanel instead of JPanel. Removed SecurityDialog parent,
+ now inherited, added call to super with securityDialog parameter
+
2015-06-16 Jiri Vanek <jvanek at redhat.com>
Removed redeclared line.separator
diff -r e2583f1178ce -r 78b33f42aa24 netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java
--- a/netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java Tue Jun 16 10:49:03 2015 +0200
+++ b/netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java Tue Jun 16 11:29:01 2015 +0200
@@ -39,33 +39,23 @@
import net.sourceforge.jnlp.JNLPFile;
import net.sourceforge.jnlp.runtime.JNLPClassLoader.SecurityDelegate;
import net.sourceforge.jnlp.security.SecurityDialog;
-import net.sourceforge.jnlp.security.dialogs.SecurityDialogPanel;
/**
* A panel that confirms that the user is OK with unsigned code running.
*/
-public class AppTrustWarningDialog extends SecurityDialogPanel {
+public class AppTrustWarningDialog {
- private AppTrustWarningDialog(final SecurityDialog dialog) {
- super(dialog);
+ public static AppTrustWarningPanel unsigned(final SecurityDialog dialog, final JNLPFile file) {
+ return new UnsignedAppletTrustWarningPanel(dialog, file);
+
}
- public static AppTrustWarningDialog unsigned(final SecurityDialog dialog, final JNLPFile file) {
- final AppTrustWarningDialog warningDialog = new AppTrustWarningDialog(dialog);
- warningDialog.add(new UnsignedAppletTrustWarningPanel(dialog, file));
- return warningDialog;
- }
-
- public static AppTrustWarningDialog partiallySigned(final SecurityDialog dialog, final JNLPFile file, final SecurityDelegate securityDelegate) {
- final AppTrustWarningDialog warningDialog = new AppTrustWarningDialog(dialog);
- warningDialog.add(new PartiallySignedAppTrustWarningPanel(file, dialog, securityDelegate));
- return warningDialog;
+ public static AppTrustWarningPanel partiallySigned(final SecurityDialog dialog, final JNLPFile file, final SecurityDelegate securityDelegate) {
+ return new PartiallySignedAppTrustWarningPanel(file, dialog, securityDelegate);
}
- public static AppTrustWarningDialog matchingAlaca(SecurityDialog x, JNLPFile file, String codebase, String remoteUrls) {
- final AppTrustWarningDialog warningDialog = new AppTrustWarningDialog(x);
- warningDialog.add(new MatchingALACAttributePanel(x, file, codebase, remoteUrls));
- return warningDialog;
+ public static AppTrustWarningPanel matchingAlaca(SecurityDialog x, JNLPFile file, String codebase, String remoteUrls) {
+ return new MatchingALACAttributePanel(x, file, codebase, remoteUrls);
}
}
diff -r e2583f1178ce -r 78b33f42aa24 netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java
--- a/netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java Tue Jun 16 10:49:03 2015 +0200
+++ b/netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java Tue Jun 16 11:29:01 2015 +0200
@@ -69,8 +69,8 @@
import net.sourceforge.jnlp.security.appletextendedsecurity.ExtendedAppletSecurityHelp;
import net.sourceforge.jnlp.security.dialogresults.DialogResult;
import net.sourceforge.jnlp.security.dialogresults.SetValueHandler;
-import net.sourceforge.jnlp.security.dialogresults.YesNo;
import net.sourceforge.jnlp.security.dialogresults.YesNoSandboxLimited;
+import net.sourceforge.jnlp.security.dialogs.SecurityDialogPanel;
import net.sourceforge.jnlp.security.dialogs.remember.RememberPanel;
import net.sourceforge.jnlp.security.dialogs.remember.RememberPanelResult;
import net.sourceforge.jnlp.security.dialogs.remember.RememberableDialog;
@@ -85,7 +85,7 @@
* plugin applets. New implementations should be added to the unit test at
* unit/net/sourceforge/jnlp/security/AppTrustWarningPanelTest
*/
-public abstract class AppTrustWarningPanel extends JPanel implements RememberableDialog{
+public abstract class AppTrustWarningPanel extends SecurityDialogPanel implements RememberableDialog{
protected int PANE_WIDTH = 500;
@@ -101,12 +101,12 @@
protected RememberPanel rememberPanel;
protected JNLPFile file;
- protected SecurityDialog parent;
/*
* Subclasses should call addComponents() IMMEDIATELY after calling the super() constructor!
*/
public AppTrustWarningPanel(JNLPFile file, SecurityDialog securityDialog) {
+ super(securityDialog);
this.file = file;
this.parent = securityDialog;
rememberPanel = new RememberPanel(file.getCodeBase());
@@ -217,9 +217,7 @@
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
Desktop.getDesktop().browse(e.getURL().toURI());
}
- } catch (IOException ex) {
- OutputController.getLogger().log(ex);
- } catch (URISyntaxException ex) {
+ } catch (IOException | URISyntaxException ex) {
OutputController.getLogger().log(ex);
}
}
More information about the distro-pkg-dev
mailing list