diff --git a/src/main/java/org/jboss/netty/handler/codec/string/StringEncoder.java b/src/main/java/org/jboss/netty/handler/codec/string/StringEncoder.java index 55212706f1..12edc3fd8f 100644 --- a/src/main/java/org/jboss/netty/handler/codec/string/StringEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/string/StringEncoder.java @@ -93,6 +93,6 @@ public class StringEncoder extends OneToOneEncoder { if (!(msg instanceof String)) { return msg; } - return copiedBuffer(String.valueOf(msg), charsetName); + return copiedBuffer((String) msg, charsetName); } }