Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / bmp-parser-impl / src / main / java / org / opendaylight / protocol / bmp / parser / tlv / StatType010TlvHandler.java
index 59c12cbbd304dbef25e26bbf17d896efe46de20c..43c66404157cbcadf12023aa1a8e5bd608c39983 100644 (file)
@@ -8,6 +8,8 @@
 
 package org.opendaylight.protocol.bmp.parser.tlv;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.base.Preconditions;
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.Unpooled;
@@ -32,8 +34,8 @@ public class StatType010TlvHandler implements BmpTlvParser, BmpTlvSerializer {
     private final SubsequentAddressFamilyRegistry safiRegistry;
 
     public StatType010TlvHandler(final AddressFamilyRegistry afiReg, SubsequentAddressFamilyRegistry safiReg) {
-        this.afiRegistry = Preconditions.checkNotNull(afiReg, "AddressFamily cannot be null");
-        this.safiRegistry = Preconditions.checkNotNull(safiReg, "SubsequentAddressFamily cannot be null");
+        this.afiRegistry = requireNonNull(afiReg, "AddressFamily cannot be null");
+        this.safiRegistry = requireNonNull(safiReg, "SubsequentAddressFamily cannot be null");
     }
 
     @Override