prefer to use standard netty bytebuf.toString since now it use cache under the hood
[idea/community.git] / platform / built-in-server / src / org / jetbrains / io / webSocket / MessageChannelHandler.java
index 8a94ed4807b36d7a3d90df594995c5f512fa1592..fe482bc618f1c04b9031212d4e499c2f0a648b90 100644 (file)
@@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
 import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
 import org.jetbrains.annotations.NotNull;
-import org.jetbrains.io.ChannelBufferToString;
+import org.jetbrains.io.NettyKt;
 import org.jetbrains.io.jsonRpc.Client;
 import org.jetbrains.io.jsonRpc.ClientManager;
 import org.jetbrains.io.jsonRpc.ClientManagerKt;
@@ -43,7 +43,7 @@ final class MessageChannelHandler extends WebSocketProtocolHandler {
     WebSocketClient client = (WebSocketClient)channel.attr(ClientManagerKt.getCLIENT()).get();
     CharSequence chars;
     try {
-      chars = ChannelBufferToString.readChars(message.content());
+      chars = NettyKt.readUtf8(message.content());
     }
     catch (Throwable e) {
       try {