Replace deprecated CheckNotNull 95/67195/6
authorClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Mon, 15 Jan 2018 15:36:35 +0000 (16:36 +0100)
committerClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Mon, 22 Jan 2018 16:51:17 +0000 (17:51 +0100)
Change-Id: I21ec7c40264533e027320f7b5b31ee895003537e
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
pcep/topology/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/config/PCEPTopologyConfiguration.java

index 0554116f5850aaec70d678cacb9a612438348e78..875ab34c1c4f9a17370cc94edbd30b8a6d605357 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.bgpcep.pcep.topology.provider.config;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import static java.util.Objects.requireNonNull;
 
 import java.net.InetSocketAddress;
 import javax.annotation.Nonnull;
@@ -29,12 +29,12 @@ public final class PCEPTopologyConfiguration {
     private final InstanceIdentifier<Topology> topology;
 
     public PCEPTopologyConfiguration(@Nonnull final SessionConfig config, @Nonnull final Topology topology) {
-        checkNotNull(topology);
-        this.address = PCEPTopologyProviderUtil
-                .getInetSocketAddress(checkNotNull(config.getListenAddress()), checkNotNull(config.getListenPort()));
-        this.keys = checkNotNull(PCEPTopologyProviderUtil.contructKeys(topology));
-        this.speakerIds = checkNotNull(PCEPTopologyProviderUtil.contructSpeakersId(topology));
-        this.topologyId = checkNotNull(topology.getTopologyId());
+        requireNonNull(topology);
+        this.address = PCEPTopologyProviderUtil.getInetSocketAddress(requireNonNull(config.getListenAddress()),
+                requireNonNull(config.getListenPort()));
+        this.keys = requireNonNull(PCEPTopologyProviderUtil.contructKeys(topology));
+        this.speakerIds = requireNonNull(PCEPTopologyProviderUtil.contructSpeakersId(topology));
+        this.topologyId = requireNonNull(topology.getTopologyId());
         this.rpcTimeout = config.getRpcTimeout();
         this.topology = InstanceIdentifier.builder(NetworkTopology.class)
                 .child(Topology.class, new TopologyKey(this.topologyId)).build();