if (currentMeta.isPresent()) {
nodeVersion = StoreUtils.increase(currentMeta.get().getNodeVersion());
}
- StoreMetadataNode newValueMeta = StoreMetadataNode.createRecursivelly(newValue, nodeVersion, nodeVersion);
+ StoreMetadataNode newValueMeta = StoreMetadataNode.createRecursively(newValue, nodeVersion, nodeVersion);
if (!modification.hasAdditionalModifications()) {
return newValueMeta;
return Optional.absent();
}
- public static final StoreMetadataNode createRecursivelly(final NormalizedNode<?, ?> node,
+ public static final StoreMetadataNode createRecursively(final NormalizedNode<?, ?> node,
final UnsignedLong nodeVersion, final UnsignedLong subtreeVersion) {
Builder builder = builder() //
.setNodeVersion(nodeVersion) //
@SuppressWarnings("unchecked")
NormalizedNodeContainer<?, ?, NormalizedNode<?, ?>> nodeContainer = (NormalizedNodeContainer<?, ?, NormalizedNode<?, ?>>) node;
for (NormalizedNode<?, ?> subNode : nodeContainer.getValue()) {
- builder.add(createRecursivelly(subNode, nodeVersion, subtreeVersion));
+ builder.add(createRecursively(subNode, nodeVersion, subtreeVersion));
}
}
return builder.build();
}
}
- public static StoreMetadataNode createRecursivelly(final NormalizedNode<?, ?> node, final UnsignedLong version) {
- return createRecursivelly(node, version, version);
+ public static StoreMetadataNode createRecursively(final NormalizedNode<?, ?> node, final UnsignedLong version) {
+ return createRecursively(node, version, version);
}
}
public void basicReadWrites() {
MutableDataTree modificationTree = MutableDataTree.from(
DataAndMetadataSnapshot.builder() //
- .setMetadataTree(StoreMetadataNode.createRecursivelly(createDocumentOne(), UnsignedLong.valueOf(5))) //
+ .setMetadataTree(StoreMetadataNode.createRecursively(createDocumentOne(), UnsignedLong.valueOf(5))) //
.setSchemaContext(schemaContext) //
.build(), new SchemaAwareApplyOperationRoot(schemaContext));
Optional<NormalizedNode<?, ?>> originalBarNode = modificationTree.read(OUTER_LIST_2_PATH);