Convert YAML Double to Integer/Long 47/116347/1
authorJim Hahn <jrh3@att.com>
Mon, 14 Dec 2020 16:36:50 +0000 (11:36 -0500)
committerJim Hahn <jrh3@att.com>
Mon, 14 Dec 2020 16:39:55 +0000 (11:39 -0500)
commite2756fa0a8054854dfaaac1c7fa064d207a0a4ae
treed0c6af9a360ee04cda225252b746be653cc6db2d
parentdd2aef555893e48ca8fcdc0cfb0a54538e49cfad
Convert YAML Double to Integer/Long

When a YAML number is decoded directly to type Object.class using the
decode() or fromJson() methods of the StandardYamlCoder, the number is
left as a Double.  It should be converted to an Integer or Long, where
possible.

Issue-ID: POLICY-2900
Change-Id: I7707ac5c54167cbc3a4b23985c6e5fa1a507324e
Signed-off-by: Jim Hahn <jrh3@att.com>
utils/src/main/java/org/onap/policy/common/utils/coder/StandardYamlCoder.java
utils/src/main/java/org/onap/policy/common/utils/coder/YamlJsonTranslator.java
utils/src/test/java/org/onap/policy/common/utils/coder/StandardYamlCoderTest.java