Bump yangtools to 4.0.1
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / datastore / node / utils / stream / AbstractLithiumDataInput.java
index 3ef0defdc8d46e3281bb8d8449d3f9cd5a9da435..d921076f716636f8053adb4ae874ed39df1c4e8b 100644 (file)
@@ -114,9 +114,12 @@ abstract class AbstractLithiumDataInput extends AbstractNormalizedNodeDataInput
     private void streamAnyxml(final NormalizedNodeStreamWriter writer) throws IOException {
         final NodeIdentifier identifier = readNodeIdentifier();
         LOG.trace("Streaming anyxml node {}", identifier);
-        writer.startAnyxmlNode(identifier);
-        writer.domSourceValue(readDOMSource());
-        writer.endNode();
+
+        final DOMSource value = readDOMSource();
+        if (writer.startAnyxmlNode(identifier, DOMSource.class)) {
+            writer.domSourceValue(value);
+            writer.endNode();
+        }
     }
 
     private void streamAugmentation(final NormalizedNodeStreamWriter writer) throws IOException {