Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / path-selection-mode / src / main / java / org / opendaylight / protocol / bgp / mode / impl / add / all / paths / AbstractAllPathsRouteEntry.java
index 5f87b9cabeeab17fd212f124066991f5d3edbd8b..bba334b24616a7b67082ea73e73e7271e8a1fec4 100644 (file)
@@ -8,7 +8,8 @@
 
 package org.opendaylight.protocol.bgp.mode.impl.add.all.paths;
 
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.collect.ImmutableList;
 import java.util.ArrayList;
 import java.util.List;
@@ -34,7 +35,7 @@ abstract class AbstractAllPathsRouteEntry extends AddPathAbstractRouteEntry {
             for (final RouteKey key : keyList) {
                 final int offset = this.offsets.offsetOf(key);
                 final ContainerNode attributes = this.offsets.getValue(this.values, offset);
-                Preconditions.checkNotNull(key.getRouteId(), "Router ID may not be null");
+                requireNonNull(key.getRouteId(), "Router ID may not be null");
                 if (attributes != null) {
                     final BestPathState state = new BestPathStateImpl(attributes);
                     final AddPathBestPath bestPath = new AddPathBestPath(state, key, offset, this.offsets.getValue(this.pathsId, offset));