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

jvergara
03.58.2008 5eb6573e3292d012f0490a55f4957009372c476c
opends/src/server/org/opends/server/util/args/ArgumentParser.java
@@ -79,6 +79,10 @@
  // The argument that will be used to trigger the display of usage information.
  private Argument usageArgument;
  // The argument that will be used to trigger the display of the OpenDS
  // version.
  private Argument versionArgument;
  // The set of unnamed trailing arguments that were provided for this parser.
  private ArrayList<String> trailingArguments;
@@ -610,6 +614,24 @@
      throw new ArgumentException(message);
    }
    if (versionArgument != null)
    {
      if (shortID == versionArgument.getShortIdentifier())
      {
        // Update the version argument to not display its short identifier.
        try {
          versionArgument = new BooleanArgument(
                  OPTION_LONG_PRODUCT_VERSION,
                  null,
                  OPTION_LONG_PRODUCT_VERSION,
                  INFO_DESCRIPTION_PRODUCT_VERSION.get());
          this.generalArgGroup.addArgument(versionArgument);
        } catch (ArgumentException e) {
          // ignore
        }
      }
    }
    String longID = argument.getLongIdentifier();
    if (longID != null)
    {
@@ -1700,12 +1722,12 @@
    this.argumentGroups.add(ioArgGroup);
    try {
      Argument version = new BooleanArgument(
      versionArgument = new BooleanArgument(
              OPTION_LONG_PRODUCT_VERSION,
              null,
              OPTION_SHORT_PRODUCT_VERSION,
              OPTION_LONG_PRODUCT_VERSION,
              INFO_DESCRIPTION_PRODUCT_VERSION.get());
      this.generalArgGroup.addArgument(version);
      this.generalArgGroup.addArgument(versionArgument);
    } catch (ArgumentException e) {
      // ignore
    }