From 80c58327faaa4873369f6bb949e62792c2f708e0 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 15 Aug 2007 21:34:53 +0000
Subject: [PATCH] This commit is a step toward getting OpenDS internationalized. There are still issues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
---
opends/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidator.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/opends/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidator.java b/opends/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidator.java
index 079034c..850dd98 100644
--- a/opends/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidator.java
+++ b/opends/src/server/org/opends/server/extensions/SimilarityBasedPasswordValidator.java
@@ -25,6 +25,7 @@
* Portions Copyright 2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
+import org.opends.messages.Message;
import java.util.List;
import java.util.Set;
@@ -42,8 +43,8 @@
import org.opends.server.admin.std.server.SimilarityBasedPasswordValidatorCfg;
import org.opends.server.admin.server.ConfigurationChangeListener;
-import static org.opends.server.messages.ExtensionsMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
+import static org.opends.messages.ExtensionMessages.*;
+import org.opends.messages.MessageBuilder;
/**
@@ -102,7 +103,7 @@
public boolean passwordIsAcceptable(ByteString newPassword,
Set<ByteString> currentPasswords,
Operation operation, Entry userEntry,
- StringBuilder invalidReason) {
+ MessageBuilder invalidReason) {
int minDifference = currentConfig.getMinimumPasswordDifference();
ByteString passwd = newPassword == null
@@ -126,8 +127,8 @@
int ldistance = LevenshteinDistance.calculate(passwd.stringValue(),
bs.stringValue());
if (ldistance < minDifference) {
- invalidReason.append(getMessage(MSGID_PWDIFFERENCEVALIDATOR_TOO_SMALL,
- minDifference));
+ invalidReason.append(ERR_PWDIFFERENCEVALIDATOR_TOO_SMALL.get(
+ minDifference));
return false;
}
}
@@ -140,7 +141,7 @@
*/
public boolean isConfigurationChangeAcceptable(
SimilarityBasedPasswordValidatorCfg configuration,
- List<String> unacceptableReasons)
+ List<Message> unacceptableReasons)
{
return true;
}
--
Gitblit v1.10.0