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/authorization/dseecompat/PatternDN.java |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/PatternDN.java b/opends/src/server/org/opends/server/authorization/dseecompat/PatternDN.java
index 440bf22..5a84589 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/PatternDN.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/PatternDN.java
@@ -31,7 +31,6 @@
 import org.opends.server.types.*;
 import static org.opends.messages.SchemaMessages.*;
 import static org.opends.messages.AccessControlMessages.*;
-import org.opends.server.protocols.asn1.ASN1OctetString;
 import static org.opends.server.util.StaticUtils.isDigit;
 import static org.opends.server.util.StaticUtils.isHexDigit;
 import static org.opends.server.util.StaticUtils.hexStringToByteArray;
@@ -448,7 +447,7 @@
       if (pos >= length)
       {
         ArrayList<ByteString> arrayList = new ArrayList<ByteString>(1);
-        arrayList.add(new ASN1OctetString());
+        arrayList.add(ByteString.empty());
         rdnComponents.add(new PatternRDN(name, arrayList, dnString));
         break;
       }
@@ -583,7 +582,7 @@
         if (pos >= length)
         {
           ArrayList<ByteString> arrayList = new ArrayList<ByteString>(1);
-          arrayList.add(new ASN1OctetString());
+          arrayList.add(ByteString.empty());
           rdn.addValue(name, arrayList, dnString);
           rdnComponents.add(rdn);
           break;
@@ -1198,7 +1197,7 @@
       try
       {
         byte[] bytes = hexStringToByteArray(hexString.toString());
-        attributeValues.add(new ASN1OctetString(bytes));
+        attributeValues.add(ByteString.wrap(bytes));
         return pos;
       }
       catch (Exception e)
@@ -1262,7 +1261,7 @@
         }
       }
 
-      attributeValues.add(new ASN1OctetString(valueString.toString()));
+      attributeValues.add(ByteString.valueOf(valueString.toString()));
       return pos;
     }
 
@@ -1281,7 +1280,7 @@
       else if (c == '*')
       {
         escaped = false;
-        attributeValues.add(new ASN1OctetString(valueString.toString()));
+        attributeValues.add(ByteString.valueOf(valueString.toString()));
       }
       else
       {
@@ -1379,7 +1378,7 @@
             throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX,
                                          message);
           }
-          attributeValues.add(new ASN1OctetString(valueString.toString()));
+          attributeValues.add(ByteString.valueOf(valueString.toString()));
           valueString = new StringBuilder();
           hexChars = new StringBuilder();
         }
@@ -1412,7 +1411,7 @@
       }
 
 
-      attributeValues.add(new ASN1OctetString(valueString.toString()));
+      attributeValues.add(ByteString.valueOf(valueString.toString()));
       return pos;
     }
   }

--
Gitblit v1.10.0