Adjust to yangtools-2.0.0 changes
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / data / SnapshotBackedWriteTransaction.java
index a02d768..a5b7ea6 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.sal.core.spi.data;
 
 import static com.google.common.base.Preconditions.checkState;
+
 import com.google.common.annotations.Beta;
 import com.google.common.base.MoreObjects.ToStringHelper;
 import com.google.common.base.Optional;
@@ -119,11 +120,12 @@ public class SnapshotBackedWriteTransaction<T> extends AbstractDOMStoreTransacti
      * @return null if the the transaction has been closed;
      */
     final Optional<NormalizedNode<?, ?>> readSnapshotNode(final YangInstanceIdentifier path) {
-        return readyImpl == null ? null : mutableTree.readNode(path);
+        return readyImpl == null ? null : Optional.fromJavaUtil(mutableTree.readNode(path));
     }
 
     private final void checkNotReady() {
-        checkState(readyImpl != null, "Transaction %s is no longer open. No further modifications allowed.", getIdentifier());
+        checkState(readyImpl != null, "Transaction %s is no longer open. No further modifications allowed.",
+                getIdentifier());
     }
 
     @Override
@@ -159,9 +161,6 @@ public class SnapshotBackedWriteTransaction<T> extends AbstractDOMStoreTransacti
     }
 
     /**
-     * Prototype implementation of
-     * {@link #ready(org.opendaylight.controller.sal.core.spi.data.SnapshotBackedWriteTransaction)}
-     *
      * This class is intended to be implemented by Transaction factories
      * responsible for allocation of {@link org.opendaylight.controller.sal.core.spi.data.SnapshotBackedWriteTransaction} and
      * providing underlying logic for applying implementation.
@@ -190,4 +189,4 @@ public class SnapshotBackedWriteTransaction<T> extends AbstractDOMStoreTransacti
          */
         protected abstract DOMStoreThreePhaseCommitCohort transactionReady(SnapshotBackedWriteTransaction<T> tx, DataTreeModification tree);
     }
-}
\ No newline at end of file
+}

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.