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

matthew_swift
19.36.2007 98fc3e24aebf9f5d51aae97550bf84091d05be4d
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
opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java 6 ●●●●● patch | view | raw | blame | history
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);