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/CharacterSetPasswordValidator.java
@@ -49,10 +49,7 @@
  /** The current configuration for this password validator. */
  private CharacterSetPasswordValidatorCfg currentConfig;
  /**
   * A mapping between the character sets and the minimum number of characters
   * required for each.
   */
  /** A mapping between the character sets and the minimum number of characters required for each. */
  private HashMap<String,Integer> characterSets;
  /**
@@ -61,11 +58,7 @@
   */
  private HashMap<String,Integer> characterRanges;
  /**
   * Creates a new instance of this character set password validator.
   */
  /** Creates a new instance of this character set password validator. */
  public CharacterSetPasswordValidator()
  {
    super();
@@ -74,9 +67,6 @@
    // performed in the initializePasswordValidator() method.
  }
  /** {@inheritDoc} */
  @Override
  public void initializePasswordValidator(
                   CharacterSetPasswordValidatorCfg configuration)
@@ -90,18 +80,12 @@
    processCharacterSetsAndRanges(configuration, true);
  }
  /** {@inheritDoc} */
  @Override
  public void finalizePasswordValidator()
  {
    currentConfig.removeCharacterSetChangeListener(this);
  }
  /** {@inheritDoc} */
  @Override
  public boolean passwordIsAcceptable(ByteString newPassword,
                                      Set<ByteString> currentPasswords,
@@ -112,7 +96,6 @@
    CharacterSetPasswordValidatorCfg config = currentConfig;
    HashMap<String,Integer> characterSets = this.characterSets;
    // Process the provided password.
    String password = newPassword.toString();
    HashMap<String,Integer> setCounts = new HashMap<>();
@@ -227,7 +210,6 @@
          usedOptionalCharacterSets++;
        }
      }
    }
    // Check minimum optional character sets are present.
@@ -285,8 +267,6 @@
    return true;
  }
  /**
   * Parses the provided configuration and extracts the character set
   * definitions and associated minimum counts from them.
@@ -469,9 +449,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationAcceptable(PasswordValidatorCfg configuration,
                                           List<LocalizableMessage> unacceptableReasons)
@@ -481,9 +458,6 @@
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationChangeAcceptable(
                      CharacterSetPasswordValidatorCfg configuration,
@@ -504,9 +478,6 @@
    return true;
  }
  /** {@inheritDoc} */
  @Override
  public ConfigChangeResult applyConfigurationChange(
                      CharacterSetPasswordValidatorCfg configuration)