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

jvergara
23.44.2009 12528a2548d419b1d48d1ec70f0f9ae3a94c0b20
opends/src/guitools/org/opends/guitools/controlpanel/task/StartStopTask.java
@@ -38,7 +38,7 @@
import org.opends.messages.Message;
/**
 * An abstract class used to refactor some code between the start, stop and
 * An abstract class used to re-factor some code between the start, stop and
 * restart tasks.
 *
 */
@@ -98,8 +98,8 @@
    // To display new status
    try
    {
      getInfo().regenerateDescriptor();
      getInfo().stopPooling();
      getInfo().regenerateDescriptor();
      ArrayList<String> arguments = getCommandLineArguments();
@@ -108,14 +108,7 @@
      arguments.toArray(args);
      returnCode = executeCommandLine(getCommandLinePath(), args);
      if (returnCode != 0)
      {
        state = State.FINISHED_WITH_ERROR;
      }
      else
      {
        state = State.FINISHED_SUCCESSFULLY;
      }
      postCommandLine();
    }
    catch (Throwable t)
    {
@@ -133,4 +126,20 @@
    ArrayList<String> args = new ArrayList<String>();
    return args;
  }
  /**
   * Method called just after calling the command-line.  To be overwritten
   * by the inheriting classes.
   */
  protected void postCommandLine()
  {
    if (returnCode != 0)
    {
      state = State.FINISHED_WITH_ERROR;
    }
    else
    {
      state = State.FINISHED_SUCCESSFULLY;
    }
  }
}