X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=dom%2Fmdsal-dom-inmemory-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fdom%2Fstore%2Finmemory%2FShardDataModificationCursor.java;h=964c582c1b260d5f7eca0375fe91eb61d67227dd;hb=41c34ca065881c748d1811b7ba6a5145ce6ed608;hp=86921c141b84601139084828bc37fd5b20d7f475;hpb=564120a9eb5d77b947187468f255353fa70ab4df;p=mdsal.git diff --git a/dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/ShardDataModificationCursor.java b/dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/ShardDataModificationCursor.java index 86921c141b..964c582c1b 100644 --- a/dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/ShardDataModificationCursor.java +++ b/dom/mdsal-dom-inmemory-datastore/src/main/java/org/opendaylight/mdsal/dom/store/inmemory/ShardDataModificationCursor.java @@ -20,21 +20,22 @@ class ShardDataModificationCursor implements DOMDataTreeWriteCursor { private final Deque stack = new ArrayDeque<>(); private final InmemoryDOMDataTreeShardWriteTransaction parent; - ShardDataModificationCursor(final ShardDataModification root, final InmemoryDOMDataTreeShardWriteTransaction parent) { + ShardDataModificationCursor(final ShardDataModification root, + final InmemoryDOMDataTreeShardWriteTransaction parent) { stack.push(root.createOperation(null)); this.parent = Preconditions.checkNotNull(parent); } + private WriteCursorStrategy getCurrent() { + return stack.peek(); + } + @Override public void enter(final PathArgument child) { WriteCursorStrategy nextOp = getCurrent().enter(child); stack.push(nextOp); } - private WriteCursorStrategy getCurrent() { - return stack.peek(); - } - @Override public void enter(final PathArgument... path) { for (PathArgument pathArgument : path) {