X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2FControllerContext.xtend;h=602e8b92425ea9d1ab26bd784893f7ff3a3a9ba1;hb=e640f23d9c37afac9ca51f48e155302bc65327ed;hp=470b4735a441ad7b5f3e8f421c53fea904d033d3;hpb=1e2d8181c7178f322a01bb02f0a1c7d52a391a66;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.xtend b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.xtend index 470b4735a4..602e8b9242 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.xtend +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/ControllerContext.xtend @@ -32,6 +32,7 @@ import org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil import static com.google.common.base.Preconditions.* +import org.opendaylight.yangtools.yang.data.impl.codec.TypeDefinitionAwareCodec class ControllerContext implements SchemaServiceListener { @@ -288,9 +289,10 @@ class ControllerContext implements SchemaServiceListener { private def void addKeyValue(HashMap map, DataSchemaNode node, String uriValue) { checkNotNull(uriValue); checkArgument(node instanceof LeafSchemaNode); - val decoded = URLDecoder.decode(uriValue); + val urlDecoded = URLDecoder.decode(uriValue); + val typedef = (node as LeafSchemaNode).type; + val decoded = TypeDefinitionAwareCodec.from(typedef)?.deserialize(urlDecoded) map.put(node.QName, decoded); - } private def String toModuleName(String str) {