From: Tony Tkacik Date: Tue, 15 Apr 2014 10:25:03 +0000 (+0000) Subject: Merge "BUG 718: changed codec for URI parsing" X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~228 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=26cb66156fe0e1f533d0e6a7dd39040c7423999f;hp=57f83eb7356bbd1ab484e8695a6e9da42ce46806;p=controller.git Merge "BUG 718: changed codec for URI parsing" --- 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 837d7ae5b7..cb02fc89bf 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 @@ -483,7 +483,7 @@ class ControllerContext implements SchemaContextListener { + "\" cannot contain \"null\" value as a key." ) } - keyValues.addKeyValue(listNode.getDataChildByName(key), uriKeyValue); + keyValues.addKeyValue(listNode.getDataChildByName(key), uriKeyValue, mountPoint); i = i + 1; } consumed = consumed + i; @@ -541,13 +541,13 @@ class ControllerContext implements SchemaContextListener { } } - private def void addKeyValue(HashMap map, DataSchemaNode node, String uriValue) { + private def void addKeyValue(HashMap map, DataSchemaNode node, String uriValue, MountInstance mountPoint) { checkNotNull(uriValue); checkArgument(node instanceof LeafSchemaNode); val urlDecoded = URLDecoder.decode(uriValue); val typedef = (node as LeafSchemaNode).type; - var decoded = TypeDefinitionAwareCodec.from(typedef)?.deserialize(urlDecoded) + var decoded = RestCodec.from(typedef, mountPoint)?.deserialize(urlDecoded) var additionalInfo = "" if(decoded === null) { var baseType = RestUtil.resolveBaseTypeFrom(typedef)