ModifiedNode modification = rootNode;
int i = 1;
- for(PathArgument pathArg : path.getPathArguments()) {
+ for (PathArgument pathArg : path.getPathArguments()) {
Optional<ModificationApplyOperation> potential = operation.getChild(pathArg);
if (!potential.isPresent()) {
throw new IllegalArgumentException(String.format("Child %s is not present in schema tree.",
return OperationWithModification.from(operation, modification);
}
- @Override
- public void ready() {
- final boolean wasRunning = UPDATER.compareAndSet(this, 0, 1);
- Preconditions.checkState(wasRunning, "Attempted to seal an already-sealed Data Tree.");
-
- rootNode.seal();
- }
-
private void checkSealed() {
Preconditions.checkState(sealed == 0, "Data Tree is sealed. No further modifications allowed.");
}
applyNode(cursor, child);
}
}
+
+ @Override
+ public void ready() {
+ final boolean wasRunning = UPDATER.compareAndSet(this, 0, 1);
+ Preconditions.checkState(wasRunning, "Attempted to seal an already-sealed Data Tree.");
+
+ AbstractReadyIterator current = AbstractReadyIterator.create(rootNode);
+ do {
+ current = current.process();
+ } while (current != null);
+ }
+
}