Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / FSIcmpCodeHandler.java
index b97ddb10d92ce1be6364278bf9f77454fe4517a3..fc23cc72e9984fb48b6b2eda53f930c2b9860239 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;
@@ -33,7 +35,7 @@ public final class FSIcmpCodeHandler implements FlowspecTypeParser, FlowspecType
 
     @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 IcmpCodeCaseBuilder().setCodes(parseIcmpCode(buffer)).build();
     }