Bump upstreams for 2022.09 Chlorine
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / SouthboundUtil.java
index 12c9275bf275c4eca47b7c44ef4d2b4333fbe5f1..ced4324926d7f70c57bef948bdc3d9d762ff9d0b 100644 (file)
@@ -7,8 +7,9 @@
  */
 package org.opendaylight.ovsdb.southbound;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.FluentFuture;
 import java.net.InetAddress;
 import java.net.NetworkInterface;
@@ -49,7 +50,7 @@ public final class SouthboundUtil {
     }
 
     public static Optional<OvsdbNodeAugmentation> getManagingNode(DataBroker db, OvsdbBridgeAttributes mn) {
-        Preconditions.checkNotNull(mn);
+        requireNonNull(mn);
         try {
             OvsdbNodeRef ref = mn.getManagedBy();
             if (ref != null && ref.getValue() != null) {
@@ -58,8 +59,7 @@ public final class SouthboundUtil {
                 // Note: erasure makes this safe in combination with the typecheck below
                 InstanceIdentifier<Node> path = (InstanceIdentifier<Node>) ref.getValue();
 
-                FluentFuture<Optional<Node>> nf = transaction.read(
-                        LogicalDatastoreType.OPERATIONAL, path);
+                FluentFuture<Optional<Node>> nf = transaction.read(LogicalDatastoreType.OPERATIONAL, path);
                 transaction.close();
                 Optional<Node> optional = nf.get();
                 if (optional != null && optional.isPresent()) {
@@ -103,7 +103,7 @@ public final class SouthboundUtil {
             }
         } catch (InterruptedException | ExecutionException e) {
             LOG.warn("Read Operational/DS for Node failed! {}", connectionIid, e);
-            throw new RuntimeException(e);
+            throw new IllegalStateException(e);
         }
         return node;
     }
@@ -120,7 +120,7 @@ public final class SouthboundUtil {
             }
         } catch (InterruptedException | ExecutionException e) {
             LOG.warn("Read Operational/DS for Node failed! {}", connectionIid, e);
-            throw new RuntimeException(e);
+            throw new IllegalStateException(e);
         }
         return node;
     }