Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / bmp-impl / src / main / java / org / opendaylight / protocol / bmp / impl / BmpMessageToByteEncoder.java
index a9200e9d16e9f517b6239dc436ce7bf679525d63..42d3b90f1a537e43e055e877635c45c73cbf583c 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.channel.ChannelHandler.Sharable;
 import io.netty.channel.ChannelHandlerContext;
@@ -26,11 +27,12 @@ public class BmpMessageToByteEncoder extends MessageToByteEncoder<Notification>
     private final BmpMessageRegistry registry;
 
     public BmpMessageToByteEncoder(final BmpMessageRegistry registry) {
-        this.registry = Preconditions.checkNotNull(registry);
+        this.registry = requireNonNull(registry);
     }
 
     @Override
-    protected void encode(final ChannelHandlerContext ctx, final Notification message, final ByteBuf out) throws Exception {
+    protected void encode(final ChannelHandlerContext ctx, final Notification message, final ByteBuf out)
+        throws Exception {
         LOG.trace("Encoding message: {}", message);
         this.registry.serializeMessage(message, out);
         LOG.debug("Message sent to output: {}", message);