Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / FSDestinationPortHandler.java
index 44efa69bf660eeef49fe2ce5ea472efda6a26c2d..ada3c388d72cda06c32f39c610d150097c046011 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.protocol.bgp.flowspec;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.base.Preconditions;
 import io.netty.buffer.ByteBuf;
 import java.util.ArrayList;
@@ -36,7 +38,7 @@ public final class FSDestinationPortHandler implements FlowspecTypeParser, Flows
 
     @Override
     public FlowspecType parseType(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 DestinationPortCaseBuilder().setDestinationPorts(parseDestinationPort(buffer)).build();
     }