fix Databroker deprecated warnings
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / constraints / PceConstraintsCalc.java
index 1b8372ef683b08b457205ae25cd2d4ff47d33e6f..2cd7ec8065da200469d2b2e64037bb8c83dddeec 100644 (file)
@@ -7,16 +7,14 @@
  */
 package org.opendaylight.transportpce.pce.constraints;
 
-import com.google.common.base.Optional;
-
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.stream.Collectors;
-
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.transportpce.common.Timeouts;
 import org.opendaylight.transportpce.common.network.NetworkTransactionService;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev190624.PathComputationRequestInput;
@@ -317,7 +315,7 @@ public class PceConstraintsCalc {
     }
 
     private Optional<PathDescription> getPathDescriptionFromDatastore(String serviceName) {
-        Optional<PathDescription> result = Optional.absent();
+        Optional<PathDescription> result = Optional.empty();
         InstanceIdentifier<ServicePaths> pathDescriptionIID = InstanceIdentifier.create(ServicePathList.class)
                 .child(ServicePaths.class, new ServicePathsKey(serviceName));
         try {
@@ -331,8 +329,6 @@ public class PceConstraintsCalc {
                     result = Optional.of(path);
                 }
             }
-//            return pathDescReadTx.read(LogicalDatastoreType.CONFIGURATION, pathDescriptionIID)
-//                    .get(Timeouts.DATASTORE_READ, TimeUnit.MILLISECONDS);
         } catch (InterruptedException | ExecutionException | TimeoutException e) {
             LOG.warn(
                 "PCE diversity constraints: Exception while getting path description from datastore {} for service {}!",