Do not attempt to construct invalid QNames 29/51729/1
authorRobert Varga <rovarga@cisco.com>
Sun, 18 Dec 2016 13:13:12 +0000 (14:13 +0100)
committerJakub Toth <jatoth@cisco.com>
Sat, 11 Feb 2017 01:33:04 +0000 (02:33 +0100)
commitf08db04b475debddfd2c60a13482e6e21dcbd7e0
treeef24e198afc54b01573e28cc1f185c116e126435
parent7a5c4a37c4d2b46cdc031e2c45ffdc44ad08e105
Do not attempt to construct invalid QNames

This fixes an attempt to instantiate a QName with a colon
in its local name. Two of the failing tests are straightforward
fixes.

The RestconfOperationsServiceImpl is more involved, as it requires
faking module imports to keep encoding working.

Change-Id: Iceed2310e94a16189d80fe57b58510fbfc45e17a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Jakub Toth <jatoth@cisco.com>
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/FakeContainerSchemaNode.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/ContainerSchemaNodeImpl.java with 82% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/FakeImportedModule.java [new file with mode: 0644]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/FakeLeafSchemaNode.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/LeafSchemaNodeImpl.java with 88% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/FakeModuleImport.java [new file with mode: 0644]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/FakeRestconfModule.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/ModuleImpl.java with 81% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/RestconfOperationsServiceImpl.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/rest/services/impl/RestconfOperationsServiceTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/restful/utils/CreateStreamUtilTest.java