Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / FSSourcePortHandler.java
index 77c8e2017c29631a4f2540a778a97254f2fab50f..f19774d03368230b77c78b15ee0dfdb7f6495a74 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 FSSourcePortHandler implements FlowspecTypeParser, FlowspecTy
 
     @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 SourcePortCaseBuilder().setSourcePorts(parseSourcePort(buffer)).build();
     }