Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / handlers / FSIpv4DestinationPrefixHandler.java
index 731e4733de8c64949ab181cffccbf470169ed57f..3e265b0cf67920a5357da930f8ecb4e070569166 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.protocol.bgp.flowspec.handlers;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.base.Preconditions;
 import io.netty.buffer.ByteBuf;
 import org.opendaylight.protocol.util.ByteBufWriteUtil;
@@ -27,7 +29,7 @@ public final class FSIpv4DestinationPrefixHandler implements FlowspecTypeParser,
 
     @Override
     public FlowspecType parseType(final ByteBuf buffer) {
-        Preconditions.checkNotNull(buffer, "input buffer is null, missing data to parse.");
+        requireNonNull(buffer, "input buffer is null, missing data to parse.");
         return new DestinationPrefixCaseBuilder().setDestinationPrefix(Ipv4Util.prefixForByteBuf(buffer)).build();
     }
 }