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/IntegerSyntax.java | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/opends/src/server/org/opends/server/schema/IntegerSyntax.java b/opends/src/server/org/opends/server/schema/IntegerSyntax.java
index 5d99577..ffe0877 100644
--- a/opends/src/server/org/opends/server/schema/IntegerSyntax.java
+++ b/opends/src/server/org/opends/server/schema/IntegerSyntax.java
@@ -38,12 +38,9 @@
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
-import org.opends.server.types.AttributeValue;
-import org.opends.server.types.ByteString;
-import org.opends.server.types.DirectoryException;
-import org.opends.server.types.ResultCode;
+import org.opends.server.types.*;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.messages.SchemaMessages.*;
@@ -84,12 +81,12 @@
ByteString nvalue = value.getNormalizedValue();
try
{
- return Integer.valueOf(nvalue.stringValue());
+ return Integer.valueOf(nvalue.toString());
}
catch (NumberFormatException e)
{
Message message =
- WARN_ATTR_SYNTAX_ILLEGAL_INTEGER.get(nvalue.stringValue());
+ WARN_ATTR_SYNTAX_ILLEGAL_INTEGER.get(nvalue.toString());
throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
message);
}
@@ -253,10 +250,10 @@
* @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)
{
- String valueString = value.stringValue();
+ String valueString = value.toString();
int length = valueString.length();
if (length == 0)
--
Gitblit v1.10.0