Switch to StandardCharsets
authorRobert Varga <rovarga@cisco.com>
Mon, 18 Jul 2016 14:40:07 +0000 (16:40 +0200)
committerRobert Varga <rovarga@cisco.com>
Mon, 18 Jul 2016 15:28:43 +0000 (17:28 +0200)
Guava's Charsets should not be used when StandardCharsets are
available.

Change-Id: I7c52bd3070bb48857cbba82e8d4bc5993d7aea9d
Signed-off-by: Robert Varga <rovarga@cisco.com>
src/test/java/org/opendaylight/protocol/framework/SimpleByteToMessageDecoder.java

index cb9e18085867b2687403e96f3a01d52cbcd90881..36bf4a1740021b64b4fb54fccf50feffcd8bef03 100644 (file)
@@ -10,17 +10,15 @@ package org.opendaylight.protocol.framework;
 import io.netty.buffer.ByteBuf;
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.ByteToMessageDecoder;
-
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 
-import com.google.common.base.Charsets;
-
 /**
  *
  */
 public class SimpleByteToMessageDecoder extends ByteToMessageDecoder {
     @Override
     protected void decode(final ChannelHandlerContext ctx, final ByteBuf in, final List<Object> out) {
-        out.add(new SimpleMessage(Charsets.UTF_8.decode(in.nioBuffer()).toString()));
+        out.add(new SimpleMessage(StandardCharsets.UTF_8.decode(in.nioBuffer()).toString()));
     }
 }