From 145ab517b749e464dd80ac6726d49a044cc054b0 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 21 Jan 2015 10:38:03 +0000
Subject: [PATCH] OPENDJ-1749 dsconfig does not work anymore and always reports the same error (conflict on short options)
---
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java b/opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java
index b611a29..f403135 100644
--- a/opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java
+++ b/opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java
@@ -244,15 +244,19 @@
addGlobalArgument(argument, null);
}
- /** {@inheritDoc} */
+ /**
+ * Adds the provided argument to the set of arguments handled by this parser and puts the argument in the LDAP
+ * connection group.
+ *
+ * @param argument
+ * The argument to add to this sub command.
+ * @throws ArgumentException
+ * If the provided argument conflicts with another global or subcommand argument that has already been
+ * defined.
+ */
@Override
- public void addArgument(Argument argument) throws ArgumentException {
- final ArgumentGroup group = getStandardGroup(argument);
- if (group == ldapArgGroup) {
- addGlobalArgument(argument);
- } else {
- super.addArgument(argument);
- }
+ public void addLdapConnectionArgument(final Argument argument) throws ArgumentException {
+ addGlobalArgument(argument, null);
}
/**
--
Gitblit v1.10.0