Bug 2816: Changed BooleanStringCodec deserialization 67/21867/2
authorDebalina Ghosh <debalina.ghosh@hp.com>
Thu, 14 May 2015 16:59:57 +0000 (09:59 -0700)
committerTony Tkacik <ttkacik@cisco.com>
Tue, 16 Jun 2015 14:13:03 +0000 (16:13 +0200)
commit1edcb8a1a0dbe1df3e765d13c14128b5a9ac7cdf
treeba929ac73897721bccf47155da4fdb809d3195d1
parent0c092cbca774271a87578432212fb398f61543a4
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>
(cherry picked from commit 0686c2d01f18a44f65811dc3fffce0ade2e8cd4e)
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