Bug 5845: can not transform ba to bi, when keys contain boolean type 07/39307/1
authorFilip Gregor <fgregor@cisco.com>
Fri, 13 May 2016 08:54:38 +0000 (10:54 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 24 May 2016 08:08:42 +0000 (08:08 +0000)
commite1309cc2d2d79ba6408d53fbc0786b224e6f1944
tree876c73dc365def2b0644252ea4e4889c2b58bfe9
parent6d2a807f26c3cea7f9ae28253f3cd5b9602e6a14
Bug 5845: can not transform ba to bi, when keys contain boolean type

Reworked check for getter methods, added test method
for getting boolean key starts with is due to the fact
that it is a boolean.

As it turns out, LeafNodeCodecContext already gives us
a ready-made name via getGetter().getName(), so let's
use that.

Also take a moment to do some minor cleaups while we're
at it.

Change-Id: I36adc6ff37159dba257a6fa437ab55eb49ed1151
Signed-off-by: Filip Gregor <fgregor@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 57773e0b8ab436cf29f9116b01cf9da39bc41663)
binding/mdsal-binding-dom-adapter/src/test/java/org/opendaylight/mdsal/binding/dom/adapter/test/Bug5845booleanKeyTest.java [new file with mode: 0644]
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/BindingCodecContext.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/LeafNodeCodecContext.java
binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/yangtools/binding/data/codec/impl/ValueContext.java
binding/mdsal-binding-test-model/src/main/yang/opendaylight-bug-5845.yang [new file with mode: 0644]