Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / bmp-parser-impl / src / main / java / org / opendaylight / protocol / bmp / parser / tlv / StatType009TlvHandler.java
index d352ffaa4ece7c592a8045a7630d2c60b9d55139..8def06a9f4439c9fd30220346f30212d7b25dee6 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 StatType009TlvHandler implements BmpTlvParser, BmpTlvSerializer {
     private final SubsequentAddressFamilyRegistry safiRegistry;
 
     public StatType009TlvHandler(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