BUG-7464: Reduce instanceof checks to null checks
[yangtools.git] / third-party / triemap / src / main / java / org / opendaylight / yangtools / triemap / CNode.java
index 489a6ef109826ccc0ea3e4f11abae12d8cab1a9b..b4882da95b9345e538e847e1e5e7993e8d4fd14b 100644 (file)
@@ -117,7 +117,7 @@ final class CNode<K, V> extends CNodeBase<K, V> {
             if (elem instanceof INode) {
                 INode<K, V> in = (INode<K, V>) elem;
                 narr [i] = in.copyToGen(ngen, ct);
-            } else if (elem instanceof BasicNode) {
+            } else if (elem != null) {
                 narr [i] = elem;
             }
             i += 1;