/hg/icedtea-web: Cleaned up "throws IOException" from HTMLPanel ...

aazores at icedtea.classpath.org aazores at icedtea.classpath.org
Thu Jul 25 12:43:17 PDT 2013


changeset 9a6449585c09 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=9a6449585c09
author: Andrew Azores <aazores at redhat.com>
date: Thu Jul 25 15:42:41 2013 -0400

	Cleaned up "throws IOException" from HTMLPanel constructor and try/catches elsewhere which handled this


diffstat:

 ChangeLog                                                                         |  12 ++++++++++
 netx/net/sourceforge/jnlp/about/AboutDialog.java                                  |   8 +++---
 netx/net/sourceforge/jnlp/about/HTMLPanel.java                                    |   6 ++--
 netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java                            |   9 +-----
 netx/net/sourceforge/jnlp/runtime/Boot.java                                       |  10 +------
 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java |   9 +-----
 6 files changed, 25 insertions(+), 29 deletions(-)

diffs (158 lines):

diff -r 6904f82aa501 -r 9a6449585c09 ChangeLog
--- a/ChangeLog	Mon Jul 22 10:13:30 2013 -0400
+++ b/ChangeLog	Thu Jul 25 15:42:41 2013 -0400
@@ -1,3 +1,15 @@
+2013-07-25  Andrew Azores <aazores at redhat.com>
+	* netx/net/sourceforge/jnlp/about/AboutDialog.java (AboutDialog, display):
+	removed "throws IOException"
+	* netx/net/sourceforge/jnlp/about/HTMLPanel.java (HTMLPanel): removed
+	"throws IOException" and changed try/catch to catch IOException rather
+	than Exception
+	* netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java: removed
+	try/catch around AboutDialog.display() call
+	* netx/net/sourceforge/jnlp/runtime/Boot.java (main): same
+	* netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java:
+	same
+
 2013-07-22  Andrew Azores <aazores at redhat.com>
 	* netx/net/sourceforge/jnlp/runtime/RhinoBasedPacEvaluator.java:
 	(getProxiesWithoutCaching) added java.vm.name read permission to fix
diff -r 6904f82aa501 -r 9a6449585c09 netx/net/sourceforge/jnlp/about/AboutDialog.java
--- a/netx/net/sourceforge/jnlp/about/AboutDialog.java	Mon Jul 22 10:13:30 2013 -0400
+++ b/netx/net/sourceforge/jnlp/about/AboutDialog.java	Thu Jul 25 15:42:41 2013 -0400
@@ -45,7 +45,6 @@
 import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.io.IOException;
 import java.net.URL;
 
 import javax.swing.JButton;
@@ -70,7 +69,7 @@
     private HTMLPanel aboutPanel, authorsPanel, newsPanel, changelogPanel, copyingPanel;
     private JButton aboutButton, authorsButton, newsButton, changelogButton, copyingButton;
 
-    public AboutDialog(boolean modal) throws IOException {
+    public AboutDialog(boolean modal) {
         super(new GridBagLayout());
 
         frame = new JDialog((Frame)null, R("AboutDialogueTabAbout") + " IcedTea-Web", modal);
@@ -186,10 +185,11 @@
         frame.setVisible(true);
     }
 
-    public static void display() throws IOException {
+    public static void display() {
         display(false);
     }
-    public static void display(boolean modal) throws IOException {
+
+    public static void display(boolean modal) {
         SwingUtilities.invokeLater(new AboutDialog(modal));
     }
 
diff -r 6904f82aa501 -r 9a6449585c09 netx/net/sourceforge/jnlp/about/HTMLPanel.java
--- a/netx/net/sourceforge/jnlp/about/HTMLPanel.java	Mon Jul 22 10:13:30 2013 -0400
+++ b/netx/net/sourceforge/jnlp/about/HTMLPanel.java	Thu Jul 25 15:42:41 2013 -0400
@@ -53,13 +53,13 @@
 
     private String id;
 
-    public HTMLPanel(URL url, String identifier) throws IOException {
+    public HTMLPanel(URL url, String identifier) {
         super(new BorderLayout());
         id = identifier;
         JEditorPane pane = new JEditorPane();
-        try{
+        try {
              pane = new JEditorPane(url);
-        } catch(Exception ex){
+        } catch (IOException ex) {
             //no need to have invalid url fatal
             ex.printStackTrace();
         }
diff -r 6904f82aa501 -r 9a6449585c09 netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java	Mon Jul 22 10:13:30 2013 -0400
+++ b/netx/net/sourceforge/jnlp/controlpanel/AboutPanel.java	Thu Jul 25 15:42:41 2013 -0400
@@ -24,13 +24,12 @@
 import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.io.IOException;
 
 import javax.swing.Box;
 import javax.swing.JButton;
 import javax.swing.JLabel;
+
 import net.sourceforge.jnlp.about.AboutDialog;
-
 import net.sourceforge.jnlp.runtime.Translator;
 
 /**
@@ -52,11 +51,7 @@
         aboutButton.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
-                try {
-                    AboutDialog.display();
-                } catch (IOException ex) {
-                    throw new RuntimeException(ex);
-                }
+                AboutDialog.display();
             }
         });
         c.fill = GridBagConstraints.BOTH;
diff -r 6904f82aa501 -r 9a6449585c09 netx/net/sourceforge/jnlp/runtime/Boot.java
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Mon Jul 22 10:13:30 2013 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Thu Jul 25 15:42:41 2013 -0400
@@ -19,7 +19,6 @@
 import static net.sourceforge.jnlp.runtime.Translator.R;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.URL;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -158,13 +157,8 @@
                 System.exit(0);
             } else {
                 System.out.println(R("BLaunchAbout"));
-                try {
-                    AboutDialog.display();
-                    return;
-                } catch (IOException e) {
-                    System.out.println(R("BLaunchAboutFailure"));
-                    throw new RuntimeException(e);
-                }
+                AboutDialog.display();
+                return;
             }
         }
 
diff -r 6904f82aa501 -r 9a6449585c09 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java
--- a/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java	Mon Jul 22 10:13:30 2013 -0400
+++ b/netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java	Thu Jul 25 15:42:41 2013 -0400
@@ -41,9 +41,8 @@
 import java.awt.event.ComponentEvent;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
-import java.util.Observable;
+
 import net.sourceforge.jnlp.about.AboutDialog;
-
 import net.sourceforge.jnlp.splashscreen.impls.defaultsplashscreen2012.BasePainter;
 import net.sourceforge.jnlp.splashscreen.parts.BasicComponentSplashScreen;
 
@@ -69,11 +68,7 @@
             @Override
             public void mouseClicked(MouseEvent e) {
                 if (e.getY() < painter.getAboutOfset().y && e.getX() > (painter.getAboutOfset().x)) {
-                    try {
-                        AboutDialog.display();
-                    } catch (Exception ex) {
-                        ex.printStackTrace();
-                    }
+                    AboutDialog.display();
                 }
             }
         });



More information about the distro-pkg-dev mailing list