Use EffectiveOperation.xmlValue() in NetconfMessageTransformUtil 40/107240/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 3 Aug 2023 16:07:51 +0000 (18:07 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 3 Aug 2023 17:20:35 +0000 (19:20 +0200)
Use the well-known constant instead of performing conversions.

Change-Id: I93a8e1b8a78b78d7efe73fb8c17e832f7678b7fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 585d0bd1069bbe64dff20536c58f8c55feaaf14f)

plugins/netconf-client-mdsal/src/main/java/org/opendaylight/netconf/client/mdsal/impl/NetconfMessageTransformUtil.java

index a34193799504d4319d0e1613271a4912d9137525..7a0c9f9bb4ca0eacb616ef62ac4d2389698436d7 100644 (file)
@@ -20,7 +20,6 @@ import java.util.ArrayDeque;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Optional;
@@ -355,7 +354,7 @@ public final class NetconfMessageTransformUtil {
         }
 
         // Step two: set the top builder's metadata
-        builders.peek().builder.withAnnotation(NETCONF_OPERATION_QNAME_LEGACY, oper.toString().toLowerCase(Locale.US));
+        builders.peek().builder.withAnnotation(NETCONF_OPERATION_QNAME_LEGACY, oper.xmlValue());
 
         // Step three: build the tree
         while (true) {