Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / FSDscpHandler.java
index 0f0148ece3c27bd6a7eacb550b705c298aa2271d..0e4261cb6a4b113f59a89d2d24dc8d0e8b937493 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;
@@ -34,7 +36,7 @@ public final class FSDscpHandler implements FlowspecTypeParser, FlowspecTypeSeri
 
     @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 DscpCaseBuilder().setDscps(parseDscps(buffer)).build();
     }