From a41662c1136b2bb4a4198df89e0e87d2be3ef099 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 16 Jul 2015 14:57:56 +0000
Subject: [PATCH] AutoRefactor'ed simplify expressions
---
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/WindowsServicePanel.java | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/WindowsServicePanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/WindowsServicePanel.java
index b76143b..200cbde 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/WindowsServicePanel.java
+++ b/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;
}
--
Gitblit v1.10.0