directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1493124 - /directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.java
Date Fri, 14 Jun 2013 15:40:08 GMT
Author: pamarcelot
Date: Fri Jun 14 15:40:07 2013
New Revision: 1493124

URL: http://svn.apache.org/r1493124
Log:
Fix for DIRSTUDIO-919 (Invalid thread access when saving an new ApacheDS 2.0 configuration
file)

Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.java

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.java?rev=1493124&r1=1493123&r2=1493124&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditorUtils.java
Fri Jun 14 15:40:07 2013
@@ -151,8 +151,7 @@ public class ServerConfigurationEditorUt
             while ( !canOverwrite )
             {
                 // Open FileDialog
-                final FileDialog dialog = new FileDialog( shell, SWT.SAVE );
-                path = openFileDialogInUIThread( dialog );
+                path = openFileDialogInUIThread( shell );
                 if ( path == null )
                 {
                     return null;
@@ -245,12 +244,12 @@ public class ServerConfigurationEditorUt
     /**
      * Opens a {@link FileDialog} in the UI thread.
      *
-     * @param dialog
-     *      the file dialog
+     * @param shell
+     *      the shell
      * @return
      *      the result of the dialog
      */
-    private static String openFileDialogInUIThread( final FileDialog dialog )
+    private static String openFileDialogInUIThread( final Shell shell )
     {
         // Defining our own encapsulating class for the result
         class DialogResult
@@ -278,6 +277,7 @@ public class ServerConfigurationEditorUt
         {
             public void run()
             {
+                FileDialog dialog = new FileDialog( shell, SWT.SAVE );
                 result.setResult( dialog.open() );
             }
         } );



Mime
View raw message