From 750f4ef44dea9b12c41fedc326a6cf6e71bb56a4 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 15 Jul 2013 08:40:31 +0000
Subject: [PATCH] Created NullOutputStream.wrapOrNullStream() and used it in all tools instead of duplicating the null checks everywhere.

---
 opends/src/server/org/opends/server/tools/CreateRCScript.java |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/CreateRCScript.java b/opends/src/server/org/opends/server/tools/CreateRCScript.java
index 1ebd0d2..d8c047b 100644
--- a/opends/src/server/org/opends/server/tools/CreateRCScript.java
+++ b/opends/src/server/org/opends/server/tools/CreateRCScript.java
@@ -97,15 +97,7 @@
   public static int main(String[] args, OutputStream outStream,
                          OutputStream errStream)
   {
-    PrintStream err;
-    if (errStream == null)
-    {
-      err = NullOutputStream.printStream();
-    }
-    else
-    {
-      err = new PrintStream(errStream);
-    }
+    PrintStream err = NullOutputStream.wrapOrNullStream(errStream);
 
     EmbeddedUtils.initializeForClientUse();
 

--
Gitblit v1.10.0