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

Jean-Noël Rouvignac
20.42.2016 61b9eb1be03fc03a9f4bb0013a08ff44a1059503
opendj-server-legacy/src/main/java/org/opends/server/extensions/DictionaryPasswordValidator.java
@@ -55,11 +55,7 @@
  /** The current dictionary that we should use when performing the validation. */
  private HashSet<String> dictionary;
  /**
   * Creates a new instance of this dictionary password validator.
   */
  /** Creates a new instance of this dictionary password validator. */
  public DictionaryPasswordValidator()
  {
    super();
@@ -68,9 +64,6 @@
    // performed in the initializePasswordValidator() method.
  }
  /** {@inheritDoc} */
  @Override
  public void initializePasswordValidator(
                   DictionaryPasswordValidatorCfg configuration)
@@ -82,18 +75,12 @@
    dictionary = loadDictionary(configuration);
  }
  /** {@inheritDoc} */
  @Override
  public void finalizePasswordValidator()
  {
    currentConfig.removeDictionaryChangeListener(this);
  }
  /** {@inheritDoc} */
  @Override
  public boolean passwordIsAcceptable(ByteString newPassword,
                                      Set<ByteString> currentPasswords,
@@ -142,13 +129,10 @@
      return false;
    }
    // If we've gotten here, then the password is acceptable.
    return true;
  }
  /**
   * Loads the configured dictionary and returns it as a hash set.
   *
@@ -174,7 +158,6 @@
      throw new ConfigException(message);
    }
    // Read the contents of file into the dictionary as per the configuration.
    BufferedReader reader = null;
    HashSet<String> dictionary = new HashSet<>();
@@ -208,9 +191,6 @@
    return dictionary;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationAcceptable(PasswordValidatorCfg configuration,
                                           List<LocalizableMessage> unacceptableReasons)
@@ -220,9 +200,6 @@
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationChangeAcceptable(
                      DictionaryPasswordValidatorCfg configuration,
@@ -248,9 +225,6 @@
    return true;
  }
  /** {@inheritDoc} */
  @Override
  public ConfigChangeResult applyConfigurationChange(
                      DictionaryPasswordValidatorCfg configuration)