From 4e4b322332130bf466e3bdbd9cd7c4ca832d1049 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Fri, 17 Jul 2015 13:29:00 +0000
Subject: [PATCH] OPENDJ-2027 (CR-7617) Code cleanup
---
opendj-server-legacy/src/main/java/org/opends/server/tools/StartWindowsService.java | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/StartWindowsService.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/StartWindowsService.java
index 67a3bba..01d0fd2 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/StartWindowsService.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/StartWindowsService.java
@@ -25,7 +25,10 @@
* Portions Copyright 2013-2015 ForgeRock AS.
*/
package org.opends.server.tools;
-import org.forgerock.i18n.LocalizableMessage;
+import static org.opends.messages.ToolMessages.*;
+
+import static com.forgerock.opendj.cli.Utils.*;
+import static com.forgerock.opendj.util.OperatingSystem.*;
import java.io.OutputStream;
import java.io.PrintStream;
@@ -33,10 +36,6 @@
import org.opends.server.loggers.JDKLogging;
import org.opends.server.types.NullOutputStream;
-import static org.opends.messages.ToolMessages.*;
-import static com.forgerock.opendj.util.OperatingSystem.hasUAC;
-import static com.forgerock.opendj.cli.Utils.filterExitCode;
-
/**
* This class is used to start the Windows service associated with this
* instance on this machine.
@@ -85,8 +84,7 @@
String serviceName = ConfigureWindowsService.getServiceName();
if (serviceName == null)
{
- LocalizableMessage message = ERR_WINDOWS_SERVICE_NOT_FOUND.get();
- err.println(message);
+ printWrappedText(err, ERR_WINDOWS_SERVICE_NOT_FOUND.get());
return SERVICE_NOT_FOUND;
}
@@ -118,9 +116,8 @@
}
catch (Throwable t)
{
- LocalizableMessage message = ERR_WINDOWS_SERVICE_START_ERROR.get();
- err.println(message);
- err.println("Exception:" + t);
+ printWrappedText(err, ERR_WINDOWS_SERVICE_START_ERROR.get());
+ printWrappedText(err, "Exception:" + t);
return SERVICE_START_ERROR;
}
}
--
Gitblit v1.10.0