From 22094368c2865dcfb6daf8366425212b721a4657 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 05 Feb 2009 17:42:14 +0000
Subject: [PATCH] Merge ASN1 branch to trunk
---
opends/src/server/org/opends/server/schema/IA5StringSyntax.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/opends/src/server/org/opends/server/schema/IA5StringSyntax.java b/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
index a2e1176..6ddccd4 100644
--- a/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
+++ b/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
@@ -37,8 +37,7 @@
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
-import org.opends.server.types.ByteString;
-
+import org.opends.server.types.ByteSequence;
import static org.opends.server.loggers.ErrorLogger.*;
@@ -232,18 +231,20 @@
* @return <CODE>true</CODE> if the provided value is acceptable for use with
* this syntax, or <CODE>false</CODE> if not.
*/
- public boolean valueIsAcceptable(ByteString value,
+ public boolean valueIsAcceptable(ByteSequence value,
MessageBuilder invalidReason)
{
// We will allow any value that does not contain any non-ASCII characters.
// Empty values are acceptable as well.
- for (byte b : value.value())
+ byte b;
+ for (int i = 0; i < value.length(); i++)
{
+ b = value.byteAt(i);
if ((b & 0x7F) != b)
{
Message message = WARN_ATTR_SYNTAX_IA5_ILLEGAL_CHARACTER.get(
- value.stringValue(), String.valueOf(b));
+ value.toString(), String.valueOf(b));
invalidReason.append(message);
return false;
}
--
Gitblit v1.10.0