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

Jean-Noel Rouvignac
16.57.2015 a41662c1136b2bb4a4198df89e0e87d2be3ef099
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/WindowsServicePanel.java
@@ -188,8 +188,7 @@
    isWindowsServiceEnabled = ev.getNewDescriptor().isWindowsServiceEnabled();
    final boolean isLocal = ev.getNewDescriptor().isLocal();
    if ((isLocal != previousLocal) ||
        (isWindowsServiceEnabled != previousValue))
    if (isLocal != previousLocal || isWindowsServiceEnabled != previousValue)
    {
      previousLocal = isLocal;
      SwingUtilities.invokeLater(new Runnable()
@@ -342,10 +341,9 @@
      {
        if (enableService)
        {
          returnCode = ConfigureWindowsService.enableService(outPrintStream,
              errorPrintStream);
          if ((returnCode != ConfigureWindowsService.SERVICE_ALREADY_ENABLED) &&
              (returnCode != ConfigureWindowsService.SERVICE_ENABLE_SUCCESS))
          returnCode = ConfigureWindowsService.enableService(outPrintStream, errorPrintStream);
          if (returnCode != ConfigureWindowsService.SERVICE_ALREADY_ENABLED &&
              returnCode != ConfigureWindowsService.SERVICE_ENABLE_SUCCESS)
          {
            state = State.FINISHED_WITH_ERROR;
          }
@@ -356,11 +354,9 @@
        }
        else
        {
          returnCode = ConfigureWindowsService.disableService(outPrintStream,
              errorPrintStream);
          if ((returnCode != ConfigureWindowsService.SERVICE_ALREADY_DISABLED)
              &&
              (returnCode != ConfigureWindowsService.SERVICE_DISABLE_SUCCESS))
          returnCode = ConfigureWindowsService.disableService(outPrintStream, errorPrintStream);
          if (returnCode != ConfigureWindowsService.SERVICE_ALREADY_DISABLED
              && returnCode != ConfigureWindowsService.SERVICE_DISABLE_SUCCESS)
          {
            state = State.FINISHED_WITH_ERROR;
          }