Modify StandardCoder to handle empty source 35/120335/1
authorJim Hahn <jrh3@att.com>
Wed, 7 Apr 2021 20:23:10 +0000 (16:23 -0400)
committerJim Hahn <jrh3@att.com>
Wed, 7 Apr 2021 20:27:18 +0000 (16:27 -0400)
commit04623fef95f2b164d79ad48de2ef3708d02eda80
tree4405b33881ee796091eb42f03ea617dfbdcb40ed
parent8ebb34d51adc48d94c2ceb5a32d3341b076b8207
Modify StandardCoder to handle empty source

Currently, if the source string or source file is empty, the
StandardCoder just returns null.  Modified it to throw an exception in
those cases.  However, if the string reference is null, it will still
return null.

Issue-ID: POLICY-3172
Change-Id: Ie7d5e1b0328a24d94a75af8d18a341faebbe5d5f
Signed-off-by: Jim Hahn <jrh3@att.com>
utils/src/main/java/org/onap/policy/common/utils/coder/StandardCoder.java
utils/src/test/java/org/onap/policy/common/utils/coder/StandardCoderTest.java