Fix DataTreeCandidateNodes handling of deleted nodes
[yangtools.git] / data / yang-data-tree-spi / src / main / java / org / opendaylight / yangtools / yang / data / tree / spi / DataTreeCandidateNodes.java
index 4071970bae2696ef0c230b96878de71734e3e620..7ab94e1857c282bba489d12c5529234cb6126c9a 100644 (file)
@@ -230,14 +230,13 @@ public final class DataTreeCandidateNodes {
 
     @SuppressWarnings("unchecked")
     private static @NonNull DataTreeCandidateNode deleteNode(final NormalizedNode data) {
-        if (data instanceof NormalizedNodeContainer) {
+        if (data instanceof DistinctNodeContainer) {
             return new RecursiveDeleteCandidateNode(
                 (DistinctNodeContainer<PathArgument, NormalizedNode>) data);
         }
         return new DeleteLeafCandidateNode(data);
     }
 
-
     @SuppressWarnings("unchecked")
     private static @NonNull DataTreeCandidateNode replaceNode(final NormalizedNode oldData,
             final NormalizedNode newData) {