BUG 720 - YANG leaf as JSON input *<*:* couldn't be saved 66/11566/3
authorJozef Gloncak <jgloncak@cisco.com>
Thu, 25 Sep 2014 08:18:02 +0000 (10:18 +0200)
committerJozef Gloncak <jgloncak@cisco.com>
Wed, 15 Oct 2014 08:07:19 +0000 (10:07 +0200)
commit743fb9de9a4cafd44bcfa95d08864d7469a4a86d
tree739f6748a41b73550dc91bbfc7d26e580bfc3989
parent9b50c69a6daa839289e9fd9a1e4649c2710349be
BUG 720 - YANG leaf as JSON input *<*:* couldn't be saved

If input value for leaf in JSON format contained opending angle bracket
(<) followed by collon (:) then exception was raised.

Because schema isn't present at time of JSON input reading it was also
supposed that data could be of type leafref which is specified in format
module:value. Module part is then transformed to instance of URI object.

Chracter < isn't permitted in URI according RFC2396 for URI and while
creating instance of URI class the exception which wasn't caught was
raised and transformed to returning error message.

Change-Id: I46bb949b38623f62a02daf4390c373371775ae1f
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeReader.java
opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/json/to/cnsn/test/JsonToCnSnTest.java
opendaylight/md-sal/sal-rest-connector/src/test/resources/json-to-cnsn/invalid-uri-character-in-value.json [new file with mode: 0644]

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.