mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
16.59.2007 85bc65ad360e8021f8cbb8b52e64b71b3cbfc2f9
Launch the method backgroundTaskCompleted in the event thread.  This way we avoid having locking problems and the reactivity of the Graphical interfaces using this classes improves a lot.
1 files modified
18 ■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java 18 ●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java
@@ -26,6 +26,8 @@
 */
package org.opends.quicksetup.util;
import javax.swing.SwingUtilities;
/**
@@ -62,12 +64,24 @@
  {
    try
    {
      T returnValue = backgroundTask.processBackgroundTask();
      final T returnValue = backgroundTask.processBackgroundTask();
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
      backgroundTask.backgroundTaskCompleted(returnValue, null);
    }
    catch (Throwable t)
      });
    }
    catch (final Throwable t)
    {
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
    {
      backgroundTask.backgroundTaskCompleted(null, t);
    }
      });
    }
  }
}