Do not attempt to construct invalid QNames 26/49526/3
authorRobert Varga <rovarga@cisco.com>
Sun, 18 Dec 2016 13:13:12 +0000 (14:13 +0100)
committerRobert Varga <rovarga@cisco.com>
Sun, 18 Dec 2016 19:16:04 +0000 (20:16 +0100)
commitb345bb647b410ce35d1c0eb2b86d5958c83ba947
tree89c7e37812dc7840b55c85c12c4b6b302e829ad3
parent3e309063bc2e1a9f66dd4217dd033f4a24cf3d90
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>
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/NetconfDeviceTest.java
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 82% 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