/hg/release/icedtea-web-1.7: 2 new changesets

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Wed Oct 17 16:36:32 UTC 2018


changeset 5b3e94efb41c in /hg/release/icedtea-web-1.7
details: http://icedtea.classpath.org/hg/release/icedtea-web-1.7?cmd=changeset;node=5b3e94efb41c
author: Jiri Vanek <jvanek at redhat.com>
date: Wed Oct 17 18:16:40 2018 +0200

	Removed EDT_DAEMON_THREAD_POOL


changeset 323a36b41c4a in /hg/release/icedtea-web-1.7
details: http://icedtea.classpath.org/hg/release/icedtea-web-1.7?cmd=changeset;node=323a36b41c4a
author: Jiri Vanek <jvanek at redhat.com>
date: Wed Oct 17 18:36:19 2018 +0200

	LockedFile.java: caching enabled, or at least semi-enabled on windows


diffstat:

 ChangeLog                                                                                              |   24 +
 netx/net/sourceforge/jnlp/controlpanel/CachePane.java                                                  |    9 +-
 netx/net/sourceforge/jnlp/controlpanel/CommandLine.java                                                |    4 +
 netx/net/sourceforge/jnlp/controlpanel/DesktopShortcutPanel.java                                       |    4 +-
 netx/net/sourceforge/jnlp/controlpanel/PolicyPanel.java                                                |    6 +-
 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java                           |    4 +-
 netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/Blinker.java                           |    6 +-
 netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/FreeDesktopIntegrationEditorFrame.java |    4 +-
 netx/net/sourceforge/jnlp/runtime/Boot.java                                                            |    5 +-
 netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExtendedAppletSecurityHelp.java              |    3 +-
 netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java                                      |   76 +--
 netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreen.java                      |    4 +-
 netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java                      |    4 +-
 netx/net/sourceforge/jnlp/util/ImageResources.java                                                     |   16 +-
 netx/net/sourceforge/jnlp/util/lockingfile/LockedFile.java                                             |   42 ++-
 netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPane.java                                          |   22 +-
 netx/net/sourceforge/swing/SwingUtils.java                                                             |  161 +++------
 17 files changed, 199 insertions(+), 195 deletions(-)

diffs (truncated from 967 to 500 lines):

diff -r e19639f572c4 -r 323a36b41c4a ChangeLog
--- a/ChangeLog	Fri Oct 12 15:37:59 2018 +0200
+++ b/ChangeLog	Wed Oct 17 18:36:19 2018 +0200
@@ -1,3 +1,27 @@
+2018-10-17  Jiri Vanek <jvanek at redhat.com>
+            Alex Kashchenko <akashche at redhat.com>
+
+	* netx/net/sourceforge/jnlp/util/lockingfile/LockedFile.java: caching enabled, or at least semi-enabled on windows
+
+2018-10-17  Laurent Bourgès <bourges.laurent at gmail.com>
+
+	* netx/net/sourceforge/jnlp/controlpanel/CachePane.java: using SwingUtils.invokeLater instead of 
+	* netx/net/sourceforge/jnlp/controlpanel/CommandLine.java: same + calling SwingUtils.setup
+	* netx/net/sourceforge/jnlp/controlpanel/DesktopShortcutPanel.java: same
+	* netx/net/sourceforge/jnlp/controlpanel/PolicyPanel.java: same
+	* netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java: same
+	* netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/Blinker.java: same
+	* netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/FreeDesktopIntegrationEditorFrame.java: same
+	* netx/net/sourceforge/jnlp/runtime/Boot.java: same + calling SwingUtils.setup
+	* netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExtendedAppletSecurityHelp.java: same
+	* netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: same + calling SwingUtils.setup
+	* netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreen.java: same
+	* netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java: same
+	* netx/net/sourceforge/jnlp/util/logging/ConsoleOutputPane.java: same
+	* netx/net/sourceforge/jnlp/util/ImageResources.java: added check for null in stream
+	* netx/net/sourceforge/swing/SwingUtils.java: added setup-able. removed EDT_DAEMON_THREAD_POOL (thus currently not
+	working properly in jdk11+, but fix for JDK itself is on the way)
+
 2018-10-12  Jiri Vanek <jvanek at redhat.com>
 
 	reworked showDocument logic
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/controlpanel/CachePane.java
--- a/netx/net/sourceforge/jnlp/controlpanel/CachePane.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/CachePane.java	Wed Oct 17 18:36:19 2018 +0200
@@ -21,7 +21,6 @@
 import java.awt.Component;
 import java.awt.Cursor;
 import java.awt.Dimension;
-import java.awt.EventQueue;
 import java.awt.FlowLayout;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
@@ -67,6 +66,7 @@
 import net.sourceforge.jnlp.util.PropertiesFile;
 import net.sourceforge.jnlp.util.logging.OutputController;
 import net.sourceforge.jnlp.util.ui.NonEditableTableModel;
+import net.sourceforge.swing.SwingUtils;
 
 public class CachePane extends JPanel {
     final JDialog parent;
@@ -267,7 +267,7 @@
      * @see CachePane#cacheTable
      */
     private  void invokeLaterDelete() {
-        EventQueue.invokeLater(new Runnable() {
+        SwingUtils.invokeLater(new Runnable() {
             @Override
             public void run() {
                 try {
@@ -339,8 +339,7 @@
     }
 
     private void invokeLaterDeleteAll() {
-        EventQueue.invokeLater(new Runnable() {
-
+        SwingUtils.invokeLater(new Runnable() {
             @Override
             public void run() {
                 try {
@@ -362,7 +361,7 @@
      * @see CachePane#populateTable
      */
     final void invokeLaterPopulateTable() {
-        EventQueue.invokeLater(new Runnable() {
+        SwingUtils.invokeLater(new Runnable() {
             @Override
             public void run() {
                 try {
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/controlpanel/CommandLine.java
--- a/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java	Wed Oct 17 18:36:19 2018 +0200
@@ -37,6 +37,7 @@
 import net.sourceforge.jnlp.util.docprovider.formatters.formatters.PlainTextFormatter;
 import net.sourceforge.jnlp.util.logging.OutputController;
 import net.sourceforge.jnlp.util.optionparser.OptionParser;
+import net.sourceforge.swing.SwingUtils;
 
 /**
  * Encapsulates a command line interface to the deployment configuration.
@@ -495,6 +496,9 @@
      * @throws java.lang.Exception when it goes wrong
      */
     public static void main(String[] args) throws Exception {
+        // setup Swing EDT tracing:
+        SwingUtils.setup();
+
         try {
             OptionParser optionParser = new OptionParser(args, OptionsDefinitions.getItwsettingsCommands());
             if (optionParser.hasOption(OptionsDefinitions.OPTIONS.DETAILS) || optionParser.hasOption(OptionsDefinitions.OPTIONS.VERBOSE)){
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/controlpanel/DesktopShortcutPanel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/DesktopShortcutPanel.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/DesktopShortcutPanel.java	Wed Oct 17 18:36:19 2018 +0200
@@ -30,13 +30,13 @@
 import javax.swing.JButton;
 import javax.swing.JComboBox;
 import javax.swing.JLabel;
-import javax.swing.SwingUtilities;
 import net.sourceforge.jnlp.ShortcutDesc;
 
 import net.sourceforge.jnlp.config.DeploymentConfiguration;
 import net.sourceforge.jnlp.controlpanel.desktopintegrationeditor.FreeDesktopIntegrationEditorFrame;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.jnlp.runtime.Translator;
+import net.sourceforge.swing.SwingUtils;
 
 /**
  * This class provides the panel that allows the user to set whether they want
@@ -79,7 +79,7 @@
 
             @Override
             public void actionPerformed(ActionEvent e) {
-                SwingUtilities.invokeLater(new Runnable() {
+                SwingUtils.invokeLater(new Runnable() {
 
                     @Override
                     public void run() {
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/controlpanel/PolicyPanel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/PolicyPanel.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/PolicyPanel.java	Wed Oct 17 18:36:19 2018 +0200
@@ -55,7 +55,6 @@
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JTextField;
-import javax.swing.SwingUtilities;
 import net.sourceforge.jnlp.config.DeploymentConfiguration;
 
 import net.sourceforge.jnlp.config.PathsAndFiles;
@@ -64,6 +63,7 @@
 import net.sourceforge.jnlp.util.FileUtils;
 import net.sourceforge.jnlp.util.FileUtils.OpenFileResult;
 import net.sourceforge.jnlp.util.logging.OutputController;
+import net.sourceforge.swing.SwingUtils;
 
 /**
  * Implements a Policy Settings panel for the itweb-settings control panel.
@@ -264,7 +264,7 @@
         public void actionPerformed(final ActionEvent event) {
             try {
                 final URL fileUrl = new URL(fileUrlString);
-                SwingUtilities.invokeLater(new Runnable() {
+                SwingUtils.invokeLater(new Runnable() {
                     @Override
                     public void run() {
                         launchPolicyTool(frame, fileUrl.getPath());
@@ -290,7 +290,7 @@
         public void actionPerformed(final ActionEvent event) {
             try {
                 final URL fileUrl = new URL(fileUrlString);
-                SwingUtilities.invokeLater(new Runnable() {
+                SwingUtils.invokeLater(new Runnable() {
                     @Override
                     public void run() {
                         launchSimplePolicyEditor(fileUrl.getPath());
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java
--- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java	Wed Oct 17 18:36:19 2018 +0200
@@ -44,7 +44,6 @@
 import java.awt.event.KeyListener;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
-import java.awt.event.WindowEvent;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -101,6 +100,7 @@
 import net.sourceforge.jnlp.security.dialogs.remember.ExecuteAppletAction;
 import net.sourceforge.jnlp.util.ScreenFinder;
 import net.sourceforge.jnlp.util.logging.OutputController;
+import net.sourceforge.swing.SwingUtils;
 
 public class UnsignedAppletsTrustingListPanel extends JPanel {
 
@@ -146,7 +146,7 @@
         final String defaultFileName2 = "terrorList2";
         final String defaultFile1 = defaultDir + defaultFileName1;
         final String defaultFile2 = defaultDir + defaultFileName2;
-        java.awt.EventQueue.invokeLater(new Runnable() {
+        SwingUtils.invokeLater(new Runnable() {
             @Override
             public void run() {
                 try {
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/Blinker.java
--- a/netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/Blinker.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/Blinker.java	Wed Oct 17 18:36:19 2018 +0200
@@ -39,8 +39,8 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import javax.swing.JComponent;
-import javax.swing.SwingUtilities;
 import javax.swing.Timer;
+import net.sourceforge.swing.SwingUtils;
 
 public class Blinker {
 
@@ -76,7 +76,7 @@
             }
             if (counter == 5) {
                 ((Timer) e.getSource()).stop();
-                SwingUtilities.invokeLater(new Runnable() {
+                SwingUtils.invokeLater(new Runnable() {
 
                     @Override
                     public void run() {
@@ -86,7 +86,7 @@
                 });
                 return;
             }
-            SwingUtilities.invokeLater(new Runnable() {
+            SwingUtils.invokeLater(new Runnable() {
 
                 @Override
                 public void run() {
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/FreeDesktopIntegrationEditorFrame.java
--- a/netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/FreeDesktopIntegrationEditorFrame.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/FreeDesktopIntegrationEditorFrame.java	Wed Oct 17 18:36:19 2018 +0200
@@ -63,6 +63,7 @@
 import net.sourceforge.jnlp.util.logging.ConsoleOutputPaneModel;
 
 import static net.sourceforge.jnlp.runtime.Translator.R;
+import net.sourceforge.swing.SwingUtils;
 
 public class FreeDesktopIntegrationEditorFrame extends JFrame {
 
@@ -213,8 +214,7 @@
     }
 
     public static void main(String args[]) {
-
-        java.awt.EventQueue.invokeLater(new Runnable() {
+        SwingUtils.invokeLater(new Runnable() {
             @Override
             public void run() {
                 new FreeDesktopIntegrationEditorFrame().setVisible(true);
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/runtime/Boot.java
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Wed Oct 17 18:36:19 2018 +0200
@@ -96,6 +96,9 @@
      * @param argsIn launching arguments
      */
     public static void main(String[] argsIn) throws UnevenParameterException {
+        // setup Swing EDT tracing:
+        SwingUtils.setup();
+
         optionParser = new OptionParser(argsIn, OptionsDefinitions.getJavaWsOptions());
 
         if (optionParser.hasOption(OptionsDefinitions.OPTIONS.VERBOSE)) {
@@ -117,7 +120,7 @@
             } catch (Exception e) {
                 OutputController.getLogger().log(OutputController.Level.ERROR_ALL, e);
             } finally {
-                //no metter what happens, terminate
+                //no matter what happens, terminate
                 return;
             }
         }
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExtendedAppletSecurityHelp.java
--- a/netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExtendedAppletSecurityHelp.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExtendedAppletSecurityHelp.java	Wed Oct 17 18:36:19 2018 +0200
@@ -47,6 +47,7 @@
 import net.sourceforge.jnlp.runtime.Translator;
 import net.sourceforge.jnlp.util.docprovider.TextsProvider;
 import net.sourceforge.jnlp.util.logging.OutputController;
+import net.sourceforge.swing.SwingUtils;
 
 public class ExtendedAppletSecurityHelp extends javax.swing.JDialog implements HyperlinkListener {
 
@@ -162,7 +163,7 @@
     }
 
     public static void main(String args[]) {
-        java.awt.EventQueue.invokeLater(new Runnable() {
+        SwingUtils.invokeLater(new Runnable() {
             public void run() {
                 ExtendedAppletSecurityHelp dialog = new ExtendedAppletSecurityHelp(null, false);
                 dialog.setVisible(true);
diff -r e19639f572c4 -r 323a36b41c4a netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
--- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Fri Oct 12 15:37:59 2018 +0200
+++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Wed Oct 17 18:36:19 2018 +0200
@@ -57,7 +57,6 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.lang.ref.WeakReference;
-import java.lang.reflect.InvocationTargetException;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -96,7 +95,6 @@
 import javax.swing.KeyStroke;
 import javax.swing.ListSelectionModel;
 import javax.swing.ScrollPaneConstants;
-import javax.swing.SwingUtilities;
 import javax.swing.SwingWorker;
 import javax.swing.UIManager;
 import javax.swing.WindowConstants;
@@ -120,6 +118,7 @@
 import net.sourceforge.jnlp.util.docprovider.formatters.formatters.PlainTextFormatter;
 import net.sourceforge.jnlp.util.logging.OutputController;
 import net.sourceforge.jnlp.util.optionparser.OptionParser;
+import net.sourceforge.swing.SwingUtils;
 import sun.security.provider.PolicyParser;
 
 /**
@@ -460,7 +459,7 @@
         viewCustomButtonAction = new ActionListener() {
             @Override
             public void actionPerformed(final ActionEvent e) {
-                invokeRunnableOrEnqueueLater(new Runnable() {
+                SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
                     @Override
                     public void run() {
                         final PolicyIdentifier policyIdentifier = getSelectedPolicyIdentifier();
@@ -505,7 +504,7 @@
         closeButtonAction = new ActionListener() {
             @Override
             public void actionPerformed(final ActionEvent event) {
-                final Window parentWindow = SwingUtilities.getWindowAncestor(PolicyEditor.this);
+                final Window parentWindow = SwingUtils.getWindowAncestor(PolicyEditor.this);
                 if (parentWindow instanceof PolicyEditorWindow) {
                     ((PolicyEditorWindow) parentWindow).quit();
                 }
@@ -587,10 +586,10 @@
     }
 
     private void setParentWindowTitle(final String title) {
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
-                final Window parent = SwingUtilities.getWindowAncestor(PolicyEditor.this);
+                final Window parent = SwingUtils.getWindowAncestor(PolicyEditor.this);
                 if (!(parent instanceof PolicyEditorWindow)) {
                     return;
                 }
@@ -839,7 +838,7 @@
             return;
         }
         policyEditorController.addIdentifier(identifier);
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
                 listModel.clear();
@@ -880,7 +879,7 @@
      * or when the user presses cancel.
      */
     public void addNewIdentifierInteractive() {
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
                 final PolicyIdentifier identifier = promptForPolicyIdentifier(PolicyIdentifier.ALL_APPLETS_IDENTIFIER);
@@ -936,7 +935,7 @@
         }
         policyEditorController.removeIdentifier(identifier);
         final int fIndex = previousIndex;
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
                 listModel.removeElement(identifier);
@@ -1047,37 +1046,17 @@
         policyEditorController.clearCustomIdentifier(identifier);
     }
 
-    private void invokeRunnableOrEnqueueLater(final Runnable runnable) {
-        if (SwingUtilities.isEventDispatchThread()) {
-            runnable.run();
-        } else {
-            SwingUtilities.invokeLater(runnable);
-        }
-    }
-
-    private void invokeRunnableOrEnqueueAndWait(final Runnable runnable) throws InvocationTargetException, InterruptedException {
-        if (SwingUtilities.isEventDispatchThread()) {
-            runnable.run();
-        } else {
-            SwingUtilities.invokeAndWait(runnable);
-        }
-    }
-
     /**
      * Update the checkboxes to show the permissions granted to the specified identifier
      * @param identifier whose permissions to display
      */
     private void updateCheckboxes(final PolicyIdentifier identifier) {
-        try {
-            invokeRunnableOrEnqueueAndWait(new Runnable() {
-                @Override
-                public void run() {
-                    updateCheckboxesImpl(identifier);
-                }
-            });
-        } catch (final InterruptedException | InvocationTargetException ex) {
-            OutputController.getLogger().log(ex);
-        }
+        SwingUtils.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                updateCheckboxesImpl(identifier);
+            }
+        });
     }
 
     private void updateCheckboxesImpl(final PolicyIdentifier identifier) {
@@ -1461,7 +1440,7 @@
 
     void setChangesMade(final boolean b) {
         policyEditorController.setChangesMade(b);
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
                 setParentWindowTitle(getWindowTitleForStatus());
@@ -1529,14 +1508,14 @@
             FileUtils.showReadOnlyDialog(PolicyEditor.this);
         }
 
-        final Window parentWindow = SwingUtilities.getWindowAncestor(this);
+        final Window parentWindow = SwingUtils.getWindowAncestor(this);
         final JDialog progressIndicator = new IndeterminateProgressDialog(parentWindow, "Loading...");
         final SwingWorker<Void, Void> openPolicyFileWorker = new SwingWorker<Void, Void>() {
             @Override
             protected Void doInBackground() throws Exception {
                 try {
                     if (parentWindow != null) {
-                        invokeRunnableOrEnqueueLater(new Runnable() {
+                        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
                             @Override
                             public void run() {
                                 progressIndicator.setLocationRelativeTo(parentWindow);
@@ -1590,14 +1569,14 @@
                 break;
         }
 
-        final Window parentWindow = SwingUtilities.getWindowAncestor(this);
+        final Window parentWindow = SwingUtils.getWindowAncestor(this);
         final JDialog progressIndicator = new IndeterminateProgressDialog(parentWindow, "Saving...");
         final SwingWorker<Void, Void> savePolicyFileWorker = new SwingWorker<Void, Void>() {
             @Override
             public Void doInBackground() throws Exception {
                 try {
                     if (parentWindow != null) {
-                        invokeRunnableOrEnqueueLater(new Runnable() {
+                        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
                             @Override
                             public void run() {
                                 progressIndicator.setLocationRelativeTo(parentWindow);
@@ -1631,7 +1610,7 @@
         // This dialog is often displayed when closing the editor, and so PolicyEditor
         // may already be disposed when this dialog appears. Give a weak reference so
         // that this dialog doesn't prevent the JVM from exiting
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
                 JOptionPane.showMessageDialog(parentPolicyEditor.get(), R("PEChangesSaved"));
@@ -1646,7 +1625,7 @@
         // This dialog is often displayed when closing the editor, and so PolicyEditor
         // may already be disposed when this dialog appears. Give a weak reference so
         // that this dialog doesn't prevent the JVM from exiting
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
                 JOptionPane.showMessageDialog(parentPolicyEditor.get(), R("PECouldNotSave"), R("Error"), JOptionPane.ERROR_MESSAGE);
@@ -1655,7 +1634,7 @@
     }
 
     private void showClipboardErrorDialog() {
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
                 JOptionPane.showMessageDialog(parentPolicyEditor.get(), R("PEClipboardError"), R("Error"), JOptionPane.ERROR_MESSAGE);
@@ -1664,7 +1643,7 @@
     }
 
     private void showInvalidPolicyExceptionDialog(final PolicyIdentifier identifier) {
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override
             public void run() {
                 JOptionPane.showMessageDialog(parentPolicyEditor.get(), R("PEInvalidPolicy", identifier.toString()), R("Error"), JOptionPane.ERROR_MESSAGE);
@@ -1673,7 +1652,7 @@
     }
 
     private void showCouldNotAccessClipboardDialog() {
-        invokeRunnableOrEnqueueLater(new Runnable() {
+        SwingUtils.invokeRunnableOrEnqueueLater(new Runnable() {
             @Override


More information about the distro-pkg-dev mailing list