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/BinarySyntax.java |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/opends/src/server/org/opends/server/schema/BinarySyntax.java b/opends/src/server/org/opends/server/schema/BinarySyntax.java
index c608c86..34a28c0 100644
--- a/opends/src/server/org/opends/server/schema/BinarySyntax.java
+++ b/opends/src/server/org/opends/server/schema/BinarySyntax.java
@@ -32,9 +32,7 @@
 import org.opends.server.api.*;
 import org.opends.server.config.ConfigException;
 import org.opends.server.core.DirectoryServer;
-import org.opends.server.types.ByteString;
-import org.opends.server.types.AttributeValue;
-import org.opends.server.types.DirectoryException;
+import org.opends.server.types.*;
 
 import static org.opends.server.loggers.ErrorLogger.*;
 import static org.opends.messages.SchemaMessages.*;
@@ -65,16 +63,16 @@
   /**
    * A {@code byte[]} attribute value decoder for this syntax.
    */
-  public static final AttributeValueDecoder<byte[]> DECODER =
-    new AttributeValueDecoder<byte[]>()
+  public static final AttributeValueDecoder<ByteString> DECODER =
+    new AttributeValueDecoder<ByteString>()
   {
     /**
      * {@inheritDoc}
      */
-    public byte[] decode(AttributeValue value) throws DirectoryException {
+    public ByteString decode(AttributeValue value) throws DirectoryException {
       // Make sure that the value is valid.
       value.getNormalizedValue();
-      return value.getValueBytes();
+      return value.getValue();
     }
   };
 
@@ -235,7 +233,7 @@
    * @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)
   {
     // All values will be acceptable for the binary syntax.

--
Gitblit v1.10.0