From 274227c07205d3dbd7125ed75ed6d2acdd3c9ce0 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Fri, 10 Jan 2014 10:02:47 +0000
Subject: [PATCH] 

---
 opendj3-server-dev/src/dsml/org/opends/dsml/protocol/ByteStringUtility.java |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/opendj3-server-dev/src/dsml/org/opends/dsml/protocol/ByteStringUtility.java b/opendj3-server-dev/src/dsml/org/opends/dsml/protocol/ByteStringUtility.java
index f36d54f..e14f544 100644
--- a/opendj3-server-dev/src/dsml/org/opends/dsml/protocol/ByteStringUtility.java
+++ b/opendj3-server-dev/src/dsml/org/opends/dsml/protocol/ByteStringUtility.java
@@ -21,20 +21,17 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2012 ForgeRock AS.
+ *      Copyright 2012-2014 ForgeRock AS.
  */
 package org.opends.dsml.protocol;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
-import java.nio.CharBuffer;
 import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.CodingErrorAction;
 
-import org.opends.server.types.ByteString;
-import org.opends.server.types.ByteStringBuilder;
+import org.forgerock.opendj.ldap.ByteString;
+import org.forgerock.opendj.ldap.ByteStringBuilder;
 import org.w3c.dom.Element;
 
 /**
@@ -111,12 +108,7 @@
   {
     try
     {
-      CharsetDecoder decoder = UTF8.newDecoder();
-      decoder.onMalformedInput(CodingErrorAction.REPORT);
-      decoder.onUnmappableCharacter(CodingErrorAction.REPORT);
-      decoder.reset();
-      CharBuffer chars = decoder.decode(bs.asByteBuffer());
-      return chars.toString();
+      return new String(bs.toCharArray());
     }
     catch (Exception e)
     {

--
Gitblit v1.10.0