mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Fabio Pistolesi
01.09.2016 f18cfccb63b15a730dfa80599c3caa8ad1142376
OPENDJ-3028 Initialize default argument values after building subcommand arguments

Initialization of default argument values happened after initialization of subcommands, who add a reference to the same argument object.
Default values overrode the base object but not the reference to it for the subcommands.
Of all the CLIs using the CLI parser and Args, only dsreplication has subcommands where the issue was present.
2 files modified
5 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java 3 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java 2 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java
@@ -238,6 +238,9 @@
    {
      // Ignore
    }
    secureArgsList.initArgumentsWithConfiguration(this);
    createEnableReplicationSubCommand();
    createDisableReplicationSubCommand();
    createRelatedServersOptions();
opendj-server-legacy/src/main/java/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -399,8 +399,6 @@
      return CANNOT_INITIALIZE_ARGS;
    }
    argParser.getSecureArgsList().initArgumentsWithConfiguration(argParser);
    // Parse the command-line arguments provided to this program.
    try
    {