Author: kkolinko
Date: Fri Oct 24 20:28:04 2014
New Revision: 1634130
URL: http://svn.apache.org/r1634130
Log:
Simplify. Followup to r1634117.
There exists Charset.encode(String) that calls CharBuffer.wrap() internally.
Modified:
tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java?rev=1634130&r1=1634129&r2=1634130&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java Fri Oct 24
20:28:04 2014
@@ -19,7 +19,6 @@ package org.apache.tomcat.util.buf;
import java.io.IOException;
import java.io.Serializable;
import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.util.Locale;
@@ -227,7 +226,7 @@ public final class MessageBytes implemen
toString();
type=T_BYTES;
Charset charset = byteC.getCharset();
- ByteBuffer result = charset.encode(CharBuffer.wrap(strValue));
+ ByteBuffer result = charset.encode(strValue);
byteC.setBytes(result.array(), result.arrayOffset(), result.limit());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]