From db1a3826ba28aa6231756ebd224f16677440ed2e Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Tue, 01 Mar 2016 09:43:01 +0000
Subject: [PATCH] OPENDJ-2701 status command using -n fails if no password is provided

---
 opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/CommandBuilder.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/CommandBuilder.java b/opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/CommandBuilder.java
index 2e2cfb8..6f379e8 100644
--- a/opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/CommandBuilder.java
+++ b/opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/CommandBuilder.java
@@ -60,6 +60,11 @@
         }
     }
 
+    /** Creates a {@link CommandBuilder} with {@code null} command and subcommand names. */
+    public CommandBuilder() {
+        this(null, null);
+    }
+
     /**
      * The constructor for the CommandBuilder.
      *
@@ -111,6 +116,19 @@
     }
 
     /**
+     * Removes the provided arguments from this CommandBuilder.
+     * Arguments which are not in this {@link CommandBuilder} will be ignored.
+     *
+     * @param arguments
+     *            Arguments to be removed.
+     */
+    public void removeArguments(final Argument... arguments) {
+        for (final Argument argument : arguments) {
+            removeArgument(argument);
+        }
+    }
+
+    /**
      * Appends the arguments of another command builder to this command builder.
      *
      * @param builder

--
Gitblit v1.10.0