Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / FSTcpFlagsHandler.java
index 720c71ba8126bb08be4eb0c81e0014fcbdb158df..29d6cc52fac262b89ec1bc6e4b2ef278c8b739fc 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 io.netty.buffer.Unpooled;
@@ -37,7 +39,7 @@ public final class FSTcpFlagsHandler 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 TcpFlagsCaseBuilder().setTcpFlags(parseTcpFlags(buffer)).build();
     }