Author: markt
Date: Fri Oct 24 18:21:33 2014
New Revision: 1634114
URL: http://svn.apache.org/r1634114
Log:
Simplify
Modified:
tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java?rev=1634114&r1=1634113&r2=1634114&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java Fri Oct 24
18:21:33 2014
@@ -499,8 +499,7 @@ public final class ByteChunk implements
// new String(byte[], int, int, Charset) takes a defensive copy of the
// entire byte array. This is expensive if only a small subset of the
// bytes will be used. The code below is from Apache Harmony.
- CharBuffer cb;
- cb = charset.decode(ByteBuffer.wrap(buff, start, end-start));
+ CharBuffer cb = charset.decode(ByteBuffer.wrap(buff, start,
end-start));
return new String(cb.array(), cb.arrayOffset(), cb.length());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]