Do not issue empty list merges
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / main / java / org / opendaylight / mdsal / binding / dom / adapter / BindingToNormalizedNodeCodec.java
index 7f7a3c205daeaa24db02f6568840435a6c027792..e99ce6094501ab97843e03e7434ee7977c3e3b81 100644 (file)
@@ -449,6 +449,14 @@ public class BindingToNormalizedNodeCodec implements BindingCodecTreeFactory,
         return ImmutableNodes.fromInstanceId(runtimeContext().getSchemaContext(), parentPath);
     }
 
+    /**
+     * This method creates an empty list container of a particular type.
+     *
+     * @deprecated This method is not generally useful, as empty lists do not convey information in YANG (they are
+     *             equivalent to non-present lists). It also leaks implementation details to a broader scope and should
+     *             never have been public in the first place.
+     */
+    @Deprecated
     public NormalizedNode<?, ?> getDefaultNodeFor(final YangInstanceIdentifier parentMapPath) {
         final BindingCodecTreeNode<?> mapCodec = requireNonNull(
                 codecRegistry.getCodecContext().getSubtreeCodec(parentMapPath),