Do not repair XML namespaces on output 99/108199/3
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 3 Oct 2023 15:28:35 +0000 (17:28 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 5 Oct 2023 11:10:33 +0000 (11:10 +0000)
Our output should be namespace-clean, hence there should be no need for
repairing.

Change-Id: Iad70bf0fd750caf54c3dc7461219e8b78f46a6c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
plugins/netconf-server-mdsal/src/main/java/org/opendaylight/netconf/server/mdsal/operations/AbstractGet.java

index 7515b6d5c1afa60eae258d6a09ab55737d0ddf67..f7645a5db5ad7ced4698f0ad51d8810c3d8a71a8 100644 (file)
@@ -40,13 +40,7 @@ import org.w3c.dom.Node;
 
 // FIXME: seal when we have JDK17+
 abstract class AbstractGet extends AbstractSingletonNetconfOperation {
-    private static final XMLOutputFactory XML_OUTPUT_FACTORY;
-    private static final String FILTER = "filter";
-
-    static {
-        XML_OUTPUT_FACTORY = XMLOutputFactory.newFactory();
-        XML_OUTPUT_FACTORY.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
-    }
+    private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newFactory();
 
     private final CurrentSchemaContext schemaContext;
     private final FilterContentValidator validator;
@@ -127,7 +121,7 @@ abstract class AbstractGet extends AbstractSingletonNetconfOperation {
      */
     final Optional<YangInstanceIdentifier> getDataRootFromFilter(final XmlElement operationElement)
             throws DocumentedException {
-        final var optFilterElement = operationElement.getOnlyChildElementOptionally(FILTER);
+        final var optFilterElement = operationElement.getOnlyChildElementOptionally("filter");
         if (optFilterElement.isEmpty()) {
             return Optional.of(YangInstanceIdentifier.of());
         }