changeset 952:ca18850addad

PolicyEditor IO operations made synchronous * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: (savePolicyFile, openAndParsePolicyFile) made synchronous so that programmatically adding a new codebase has a well-defined order when performed immediately after starting a new PolicyEditor instance
author Andrew Azores <aazores@redhat.com>
date Wed, 26 Mar 2014 12:07:23 -0400
parents fcb9dcf1c83c
children 9de6713da051
files ChangeLog netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Mar 26 11:02:00 2014 -0400
+++ b/ChangeLog	Wed Mar 26 12:07:23 2014 -0400
@@ -1,3 +1,10 @@
+2014-03-26  Andrew Azores  <aazores@redhat.com>
+
+	* netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java:
+	(savePolicyFile, openAndParsePolicyFile) made synchronous so that
+	programmatically adding a new codebase has a well-defined order when
+	performed immediately after starting a new PolicyEditor instance
+
 2014-03-26  Andrew Azores  <aazores@redhat.com>
             Jiri Vanek  <jvanek@redhat.com>
 
--- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Wed Mar 26 11:02:00 2014 -0400
+++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Wed Mar 26 12:07:23 2014 -0400
@@ -1067,7 +1067,9 @@
                     OutputController.getLogger().log(e);
                 }
             }
-        }.start();
+        }.run(); // #run() to make IO synchronous right now. #start() can be used to make it async instead.
+        // http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2014-March/026886.html
+        // TODO: use SwingWorker and give some visual indication that IO is occurring
     }
 
     /**
@@ -1170,7 +1172,9 @@
                     showCouldNotSaveDialog();
                 }
             }
-        }.start();
+        }.run(); // #run() to make IO synchronous right now. #start() can be used to make it async instead.
+        // http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2014-March/026886.html
+        // TODO: use SwingWorker and give some visual indication that IO is occurring
     }
 
     /**