Normalize Decimal64 to fraction-digits 88/101288/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 23 May 2022 18:19:57 +0000 (20:19 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 25 May 2022 11:53:10 +0000 (13:53 +0200)
commit91692a843b49520475498595c042a0873fc37f8e
tree5e99d861b98099fa3329f7f351ed57d9b9a600cf
parentd7a4d9434e5e691f68d975955f78c887e0f1a9c1
Normalize Decimal64 to fraction-digits

When parsing a Decimal64, we need to scale it to fraction-digits
to ensure the input matches the expected range.

JIRA: YANGTOOLS-1437
Change-Id: I535eab4a20d30a742e94c3a6342e113cb569d0bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 415dfd816cdbefe5088ee62046f372690ab89aa7)
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/DecimalCodecStringTest.java
data/yang-data-impl/src/test/java/org/opendaylight/yangtools/yang/data/impl/codec/YT1437Test.java [new file with mode: 0644]
data/yang-data-impl/src/test/resources/yt1437.yang [new file with mode: 0644]