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

Jean-Noël Rouvignac
20.49.2016 6d2dab657d824fb82d6c58a17517cd8f1c47c70f
opendj-server-legacy/src/main/java/org/opends/server/tools/EncodePassword.java
@@ -77,8 +77,6 @@
    }
  }
  /**
   * Processes the command-line arguments and performs the requested action.
   *
@@ -91,8 +89,6 @@
    return encodePassword(args, true, System.out, System.err);
  }
  /**
   * Processes the command-line arguments and performs the requested action.
   *
@@ -129,7 +125,6 @@
    StringArgument    configFile           = null;
    StringArgument    schemeName           = null;
    // Create the command-line argument parser for use with this program.
    LocalizableMessage toolDescription = INFO_ENCPW_TOOL_DESCRIPTION.get();
    ArgumentParser argParser =
@@ -210,7 +205,6 @@
      return OPERATIONS_ERROR;
    }
    // Parse the command-line arguments provided to this program.
    try
    {
@@ -222,7 +216,6 @@
      return OPERATIONS_ERROR;
    }
    // If we should just display usage or version information,
    // then we've already done it so just return without doing anything else.
    if (argParser.usageOrVersionDisplayed())
@@ -267,7 +260,6 @@
      return OPERATIONS_ERROR;
    }
    // Determine whether we're encoding the clear-text password or comparing it
    // against an already-encoded password.
    boolean compareMode;
@@ -287,7 +279,6 @@
      compareMode = false;
    }
    if (initializeServer)
    {
      try
@@ -303,7 +294,6 @@
      }
    }
    // If we are only trying to list the available schemes, then do so and exit.
    if (listSchemes.isPresent())
    {
@@ -318,7 +308,6 @@
      return SUCCESS;
    }
    // Either encode the clear-text password using the provided scheme, or
    // compare the clear-text password against the encoded password.
    ByteString clearPW = null;
@@ -531,7 +520,7 @@
  }
  private static void listPasswordStorageSchemes(PrintStream out, PrintStream err,
      ConcurrentHashMap<String, PasswordStorageScheme> storageSchemes, boolean authPasswordSchemeName)
      ConcurrentHashMap<String, PasswordStorageScheme<?>> storageSchemes, boolean authPasswordSchemeName)
  {
    if (storageSchemes.isEmpty())
    {
@@ -678,13 +667,9 @@
    return password;
  }
  /**
   * Thread that mask user input.
   */
  /** Thread that mask user input. */
  private class ErasingThread extends Thread
  {
    private boolean stop;
    private String prompt;
@@ -698,9 +683,7 @@
      this.prompt = prompt;
    }
    /**
     * Begin masking until asked to stop.
     */
    /** Begin masking until asked to stop. */
    @Override
    public void run()
    {
@@ -723,14 +706,10 @@
      }
    }
    /**
     * Instruct the thread to stop masking.
     */
    /** Instruct the thread to stop masking. */
    public void stopMasking()
    {
      this.stop = true;
    }
  }
}