From a7f45460c31c7340310aa65c99574c7c1e0e2059 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 23 Aug 2007 17:46:41 +0000
Subject: [PATCH] Expands the interfaces of backup and restore with arguments for specifying an LDAP connection that can be used to schedule these operations as tasks in addition to the current behavior of operating locally.

---
 opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java b/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java
index 2156b5a..8cd4aeb 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskTool.java
@@ -53,8 +53,8 @@
    * @param argParser used to parse user arguments
    * @param initializeServer indicates whether or not to initialize the
    *        directory server in the case of a local action
-   * @param out stream to write messages
-   * @param err stream to write messages
+   * @param out stream to write messages; may be null
+   * @param err stream to write messages; may be null
    * @return int indicating the result of this action
    */
   protected int process(LDAPConnectionArgumentParser argParser,
@@ -69,11 +69,11 @@
         ret = tc.schedule(this, out, err);
       } catch (LDAPConnectionException e) {
         Message message = ERR_LDAP_CONN_CANNOT_CONNECT.get(e.getMessage());
-        err.println(wrapText(message, MAX_LINE_WIDTH));
+        if (err != null) err.println(wrapText(message, MAX_LINE_WIDTH));
         ret = LDAPResultCode.CLIENT_SIDE_CONNECT_ERROR;
       } catch (ArgumentException e) {
         Message message = e.getMessageObject();
-        err.println(wrapText(message, MAX_LINE_WIDTH));
+        if (err != null) err.println(wrapText(message, MAX_LINE_WIDTH));
         ret = LDAPResultCode.CLIENT_SIDE_PARAM_ERROR;
       }
     }
@@ -90,8 +90,8 @@
    *
    * @param initializeServer indicates whether or not to initialize the
    *        directory server in the case of a local action
-   * @param out stream to write messages
-   * @param err stream to write messages
+   * @param out stream to write messages; may be null
+   * @param err stream to write messages; may be null
    * @return int indicating the result of this action
    */
   abstract protected int processLocal(boolean initializeServer,

--
Gitblit v1.10.0