Use simpler parseValue() 15/111715/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 17 May 2024 12:32:04 +0000 (14:32 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 17 May 2024 13:26:56 +0000 (13:26 +0000)
We have parseValue(String), use that instead of playing tricks with
null.

Change-Id: I7c4567ed0fb2db9d018c5aa8e5166910a8e02ed7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/spi/ApiPathNormalizer.java

index 8505e0486352bc1dd93ca1810d534d606afff1e3..83e3cdce6d013340cff9bdfd5dc15c344ad2b214 100644 (file)
@@ -324,7 +324,7 @@ public final class ApiPathNormalizer implements DatabindAware, PointNormalizer {
         //            The characters in a key value string are constrained, and some
         //            characters need to be percent-encoded, as described in Section 3.5.3.
         try {
-            return databind.jsonCodecs().codecFor(schemaNode, stack).parseValue(null, value);
+            return databind.jsonCodecs().codecFor(schemaNode, stack).parseValue(value);
         } catch (IllegalArgumentException e) {
             throw new RestconfDocumentedException("Invalid value '" + value + "' for " + schemaNode.getQName(),
                 ErrorType.PROTOCOL, ErrorTag.INVALID_VALUE, e);