Bug 2816: Changed BooleanStringCodec deserialization 12/20412/7
authorDebalina Ghosh <debalina.ghosh@hp.com>
Thu, 14 May 2015 16:59:57 +0000 (09:59 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 4 Jun 2015 11:09:24 +0000 (11:09 +0000)
commit0686c2d01f18a44f65811dc3fffce0ade2e8cd4e
tree4e2185e19175823ef16a75bfc7138b87ea2db92a
parent93ca6860c4aa16be2651b146cd9157d9e67d9ef9
Bug 2816: Changed BooleanStringCodec deserialization

Added validate() to deserialize that checks whether input string is true or false.
If some other string is given, IllegalArgumentException is thrown.
Unit test is changed accordingly.

Change-Id: I51e7da19bd4cce85aa707d7741ae3956cc3e8890
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/codec/BooleanStringCodec.java
yang/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/test/codecs/BooleanCodecStringTest.java