Bump versions 9.0.4-SNAPSHOT
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / LocalReadWriteProxyTransaction.java
index ab7cdbc9fa1e5cd4172185ef50722da805135ebd..47ae6a2bc7a27ae60fc1a8b094411c65c03d4a21 100644 (file)
@@ -107,7 +107,7 @@ final class LocalReadWriteProxyTransaction extends LocalProxyTransaction {
             } catch (Exception e) {
                 LOG.debug("Failed to instantiate modification for {}", identifier, e);
                 recordedFailure = e;
-                mod = new FailedDataTreeModification(snapshot.getEffectiveModelContext(), e);
+                mod = new FailedDataTreeModification(snapshot.modelContext(), e);
             }
             modification = mod;
         }
@@ -297,7 +297,7 @@ final class LocalReadWriteProxyTransaction extends LocalProxyTransaction {
                 sealOnly();
             }
 
-            switch (maybeProtocol.get()) {
+            switch (maybeProtocol.orElseThrow()) {
                 case ABORT:
                     sendMethod.accept(new AbortLocalTransactionRequest(getIdentifier(), localActor()), cb);
                     break;
@@ -311,7 +311,7 @@ final class LocalReadWriteProxyTransaction extends LocalProxyTransaction {
                     sendMethod.accept(commitRequest(true), cb);
                     break;
                 default:
-                    throw new IllegalArgumentException("Unhandled protocol " + maybeProtocol.get());
+                    throw new IllegalArgumentException("Unhandled protocol " + maybeProtocol.orElseThrow());
             }
         }
     }