From: Igor Foltin Date: Fri, 16 Feb 2018 16:43:24 +0000 (+0100) Subject: Fix root data node QName equality check X-Git-Tag: release/nitrogen-sr3~9 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=c26b46042b457ad729b3b646f01679f1d26e3b55;p=netconf.git Fix root data node QName equality check This fixes the http error status 500 when trying to read the whole mounted datastore using the new restconf implementation based on RFC8040. When serializing a NormalizedNode that represents the data root we need to serialize only its children. Change-Id: Ibd7bd71fe6f36674f62b9d974c85045c359cc6b1 Signed-off-by: Igor Foltin --- diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/ParameterAwareNormalizedNodeWriter.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/ParameterAwareNormalizedNodeWriter.java index c86bd6fcb3..29609834f1 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/ParameterAwareNormalizedNodeWriter.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/jersey/providers/ParameterAwareNormalizedNodeWriter.java @@ -263,7 +263,7 @@ public class ParameterAwareNormalizedNodeWriter implements RestconfNormalizedNod boolean processedAsCompositeNode = false; if (node instanceof ContainerNode) { final ContainerNode n = (ContainerNode) node; - if (!n.getNodeType().equals(ROOT_DATA_QNAME)) { + if (!n.getNodeType().withoutRevision().equals(ROOT_DATA_QNAME)) { if (writer instanceof NormalizedNodeStreamAttributeWriter) { ((NormalizedNodeStreamAttributeWriter) writer).startContainerNode( n.getIdentifier(), childSizeHint(n.getValue()), n.getAttributes());