Bug 2964 - ClassCastException when querying - 91/17991/2
authorJan Hajnar <jhajnar@cisco.com>
Thu, 9 Apr 2015 07:49:06 +0000 (09:49 +0200)
committerJan Hajnar <jhajnar@cisco.com>
Thu, 9 Apr 2015 07:51:58 +0000 (07:51 +0000)
controller-config/yang-ext:mount/config:modules

* added recursive call to parseXml if baseType is leafref (otherwise
identityref and instnce identifier values were not serialized
correctly)

Change-Id: Ie17f8cff1b7bb59e541996a277ff6dfefa30a375
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/transform/dom/DomUtils.java

index 71a4d1a64f41f0a3ceaabdb75a0ecafbca47ea72..5470667a87b43bf20890f942d22d80ee33ea6d5c 100644 (file)
@@ -126,7 +126,7 @@ public final class DomUtils {
         if (baseType instanceof LeafrefTypeDefinition) {
             final LeafrefTypeDefinition leafrefTypeDefinition = (LeafrefTypeDefinition) baseType;
             baseType = SchemaContextUtil.getBaseTypeForLeafRef(leafrefTypeDefinition, schemaCtx, schema);
-            value = parseXmlValue(xml, codecProvider, baseType);
+            value = parseXmlValue(xml, codecProvider, schema, baseType, schemaCtx);
         } else if (baseType instanceof InstanceIdentifierType) {
             value = InstanceIdentifierForXmlCodec.deserialize(xml, schemaCtx);
         } else if (baseType instanceof IdentityrefTypeDefinition) {