Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
4520
Description
Trying to get an object generated from a choice statement including both leaf and container results in a NPE. I'm not 100% sure that the NPE is caused by the combination of leaf and container, but there it is. The model used resembles the following:
grouping object {
choice type {
leaf simple-type
container complex-type
{ uses some-grouping; } }
}
Real version at [1].
The object grouping is used as the input for an RPC. When trying to call RPCInput.getObject().getType() the NPE is thrown. Same result if the grouping is used for RESTCONF input, when reading the generated objects. Here are the relevant first few lines (based on the real model):
java.lang.NullPointerException
at org.opendaylight.yangtools.binding.data.codec.impl.ChoiceNodeCodecContext.deserialize(ChoiceNodeCodecContext.java:157)
at org.opendaylight.yangtools.binding.data.codec.impl.ChoiceNodeCodecContext.deserializeObject(ChoiceNodeCodecContext.java:169)
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:329)
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:122)
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:69)
at com.sun.proxy.$Proxy81.getAddress(Unknown Source)
at org.opendaylight.lispflowmapping.implementation.MappingService.addKey(MappingService.java:140)