Enforce range constraints in DecimalStringCodec 56/102056/8
authorOleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Thu, 11 Aug 2022 10:16:49 +0000 (12:16 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 3 Oct 2022 16:14:07 +0000 (18:14 +0200)
commit293d2ff97740f582cd402e3b4850d22d6752b9db
tree92310220b9f3b4c928b3212a4614086eefd226af
parenta3bdb0fbc05db361f7c105469ffd73b1e35390be
Enforce range constraints in DecimalStringCodec

Added check which will report YangInvalidValueException if the parsed
value doesn't match range constraints specified in DecimalTypeDefinition.
Added explicit test for this change.

JIRA: YANGTOOLS-1442
Change-Id: I7a00fb540ae64e8f5bdde58aa7297e0e5f91d780
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
data/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/codec/DecimalStringCodec.java
data/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/codec/YT1442Test.java [new file with mode: 0644]
data/yang-data-impl/src/test/resources/yt1442.yang [new file with mode: 0644]