Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / FSPacketLengthHandler.java
index 6451c64ee5edea1ba4eaa9fa8069dc9ad195c91f..4fae7674c64d3f00cc1a77a1fa2da2a6d7921070 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 FSPacketLengthHandler implements FlowspecTypeParser, Flowspec
 
     @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 PacketLengthCaseBuilder().setPacketLengths(parsePacketLength(buffer)).build();
     }