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/tools/LDAPToolUtils.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/LDAPToolUtils.java b/opends/src/server/org/opends/server/tools/LDAPToolUtils.java
index dc0ba70..519b4c3 100644
--- a/opends/src/server/org/opends/server/tools/LDAPToolUtils.java
+++ b/opends/src/server/org/opends/server/tools/LDAPToolUtils.java
@@ -32,10 +32,10 @@
 import java.io.IOException;
 import java.io.PrintStream;
 
-import org.opends.server.protocols.asn1.ASN1OctetString;
 import org.opends.server.protocols.ldap.LDAPControl;
 import org.opends.server.protocols.ldap.LDAPResultCode;
 import org.opends.server.types.DN;
+import org.opends.server.types.ByteString;
 
 import static org.opends.messages.ToolMessages.*;
 import static org.opends.server.util.ServerConstants.*;
@@ -68,7 +68,7 @@
     LDAPControl control = null;
     String controlOID = null;
     boolean controlCriticality = false;
-    ASN1OctetString controlValue = null;
+    ByteString controlValue = null;
 
     int idx = argString.indexOf(":");
 
@@ -170,7 +170,7 @@
     if(valString.charAt(0) == ':')
     {
       controlValue =
-           new ASN1OctetString(valString.substring(1, valString.length()));
+          ByteString.valueOf(valString.substring(1, valString.length()));
     } else if(valString.charAt(0) == '<')
     {
       // Read data from the file.
@@ -178,7 +178,7 @@
       try
       {
         byte[] val = readBytesFromFile(filePath, err);
-        controlValue = new ASN1OctetString(val);
+        controlValue = ByteString.wrap(val);
       }
       catch (Exception e)
       {
@@ -186,7 +186,7 @@
       }
     } else
     {
-      controlValue = new ASN1OctetString(valString);
+      controlValue = ByteString.valueOf(valString);
     }
 
     control = new LDAPControl(controlOID, controlCriticality, controlValue);

--
Gitblit v1.10.0