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

jvergara
08.07.2008 ed803f46487547b3134c8fd58b12916372556878
opendj-sdk/opends/src/server/org/opends/server/util/args/LDAPConnectionArgumentParser.java
@@ -327,7 +327,7 @@
            args.hostNameArg.getValue(),
            args.portArg.getIntValue(),
            args.bindDnArg.getValue(),
            args.bindPasswordArg.getValue(),
            getPasswordValue(args.bindPasswordArg, args.bindPasswordFileArg),
            connectionOptions, out, err);
  }
@@ -407,6 +407,25 @@
    return args;
  }
  /**
   * Commodity method that retrieves the password value analyzing the contents
   * of a string argument and of a file based argument.  It assumes that the
   * arguments have already been parsed and validated.
   * @param bindPwdArg the string argument.
   * @param bindPwdFileArg the file based argument.
   * @return the password value.
   */
  public static String getPasswordValue(StringArgument bindPwdArg,
      FileBasedArgument bindPwdFileArg)
  {
    String pwd = bindPwdArg.getValue();
    if ((pwd == null) && bindPwdFileArg.isPresent())
    {
      pwd = bindPwdFileArg.getValue();
    }
    return pwd;
  }
  private void addLdapConnectionArguments(ArgumentGroup argGroup) {
    args = new SecureConnectionCliArgs();
    try {