X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2Fhandler%2FNetconfMessageChunkDecoder.java;fp=opendaylight%2Fnetconf%2Fnetconf-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Futil%2Fhandler%2FNetconfMessageChunkDecoder.java;h=77ef3861d2325d0e478ec058259487dfe5d9c756;hb=a06b268df0070f1b6502a83214b949852774fa58;hp=5c00b9b7153818082cd3b2303efec085e6619f30;hpb=195dbe7884c7338a8fe9b58765ca5665f4a6f78a;p=controller.git diff --git a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfMessageChunkDecoder.java b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfMessageChunkDecoder.java index 5c00b9b715..77ef3861d2 100644 --- a/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfMessageChunkDecoder.java +++ b/opendaylight/netconf/netconf-util/src/main/java/org/opendaylight/controller/netconf/util/handler/NetconfMessageChunkDecoder.java @@ -13,7 +13,6 @@ import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; -import java.nio.charset.Charset; import java.util.List; import org.opendaylight.controller.netconf.api.NetconfDeserializerException; @@ -21,8 +20,9 @@ import org.opendaylight.controller.netconf.util.messages.NetconfMessageConstants import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class NetconfMessageChunkDecoder extends ByteToMessageDecoder { +import com.google.common.base.Charsets; +public class NetconfMessageChunkDecoder extends ByteToMessageDecoder { private final static Logger logger = LoggerFactory.getLogger(NetconfMessageChunkDecoder.class); @Override @@ -63,7 +63,7 @@ public class NetconfMessageChunkDecoder extends ByteToMessageDecoder { while ((b = in.readByte()) != 10) { chunkSize.writeByte(b); } - return Integer.parseInt(chunkSize.toString(Charset.forName("UTF-8"))); + return Integer.parseInt(chunkSize.toString(Charsets.US_ASCII)); } }