Bug 1869: Fixed binding-data-codec to work with empty type
authorTony Tkacik <ttkacik@cisco.com>
Mon, 15 Sep 2014 08:39:43 +0000 (10:39 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Mon, 15 Sep 2014 09:18:34 +0000 (11:18 +0200)
commit669bf6de5abb73e85562c44f11b01d00bec5687c
tree94fee9a59dfc24f58314a54dcf7556070fb864ed
parente93b12bed99561a3737dd1e9cb29af32a7895bf8
Bug 1869: Fixed binding-data-codec to work with empty type

Empty type is special case, which does not contain value,
but has only presence characteristic and in Binding Specification v1
it was converted to boolean (true = present, false or null not present)
but new codecs did not have that special handling for empty type
which caused some models to fail.

Fixed places affected by this bug and added test case which now
explicitly tests empty type support.

Change-Id: Idec541dc9da987cebcd46ee65d24c17b7cf9a567
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
code-generator/binding-data-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/gen/impl/DataNodeContainerSerializerSource.java
code-generator/binding-data-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/BindingCodecContext.java
code-generator/binding-data-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/ValueTypeCodec.java
code-generator/binding-data-codec/src/test/java/org/opendaylight/yangtools/binding/data/codec/test/EmptyLeafTest.java [new file with mode: 0644]
code-generator/binding-test-model/src/main/yang/opendaylight-yangtools-augment-test.yang