Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / bmp-impl / src / main / java / org / opendaylight / protocol / bmp / impl / BmpByteToMessageDecoder.java
index 5931d2a1e09c283464c4641a0204426d4a7760f6..e0d581cb9b8623ddb212f57db7a74436efe755eb 100644 (file)
@@ -8,7 +8,8 @@
 
 package org.opendaylight.protocol.bmp.impl;
 
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.ByteBufUtil;
 import io.netty.channel.ChannelHandlerContext;
@@ -25,11 +26,12 @@ public class BmpByteToMessageDecoder extends ByteToMessageDecoder {
     private final BmpMessageRegistry registry;
 
     public BmpByteToMessageDecoder(final BmpMessageRegistry registry) {
-        this.registry = Preconditions.checkNotNull(registry);
+        this.registry = requireNonNull(registry);
     }
 
     @Override
-    protected void decode(final ChannelHandlerContext ctx, final ByteBuf in, final List<Object> out) throws BmpDeserializationException {
+    protected void decode(final ChannelHandlerContext ctx, final ByteBuf in, final List<Object> out)
+        throws BmpDeserializationException {
         if (in.isReadable()) {
             LOG.trace("Received to decode: {}", ByteBufUtil.hexDump(in));
             out.add(this.registry.parseMessage(in));