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

matthew_swift
19.36.2007 47375a9e1fe7c44d187b1b7afd68cd18cf52d1ee
Fix issue 2002: dsconfig: don't support the -t option in create-xxx unless it's required

When there is only one possible value for the -t option and that value is "generic" the -t option is hidden, as it only confuses users.
1 files modified
6 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java 6 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
@@ -370,6 +370,12 @@
          OPTION_DSCFG_LONG_TYPE, false, false, true, "{TYPE}", GENERIC_TYPE,
          null, MSGID_DSCFG_DESCRIPTION_TYPE_DEFAULT, r.getChildDefinition()
              .getUserFriendlyName(), GENERIC_TYPE, typeUsage);
      // Hide the option if it defaults to generic and generic is the
      // only possible value.
      if (types.size() == 1) {
        this.typeArgument.setHidden(true);
      }
    }
    this.subCommand.addArgument(this.typeArgument);