From eac75ddfbbace6822c316fd87c82301c427434e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Br=C3=A9gier?= Date: Thu, 10 May 2012 20:54:40 +0300 Subject: [PATCH] remove unecessary .name() to Charset in String methods --- .../org/jboss/netty/handler/codec/http/DiskAttribute.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jboss/netty/handler/codec/http/DiskAttribute.java b/src/main/java/org/jboss/netty/handler/codec/http/DiskAttribute.java index 51bdb2a560..99f9ea1762 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/DiskAttribute.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/DiskAttribute.java @@ -58,14 +58,14 @@ public class DiskAttribute extends AbstractDiskHttpData implements Attribute { public String getValue() throws IOException { byte [] bytes = get(); - return new String(bytes, charset.name()); + return new String(bytes, charset); } public void setValue(String value) throws IOException { if (value == null) { throw new NullPointerException("value"); } - byte [] bytes = value.getBytes(charset.name()); + byte [] bytes = value.getBytes(charset); ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(bytes); if (definedSize > 0) { definedSize = buffer.readableBytes();