mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
15.54.2011 3bd757820d295d1bf98c2dccbae18421f8b47a0b
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/ByteString.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 *      Portions copyright 2011 ForgeRock AS
 */
package org.forgerock.opendj.ldap;
@@ -157,11 +158,7 @@
   */
  public static ByteString valueOf(final char[] chars)
  {
    Charset utf8 = Charset.forName("UTF-8");
    ByteBuffer buffer = utf8.encode(CharBuffer.wrap(chars));
    byte[] bytes = new byte[buffer.remaining()];
    buffer.get(bytes);
    return wrap(bytes);
    return wrap(StaticUtils.getBytes(chars));
  }