diff options
author | 2020-05-05 03:28:18 +0000 | |
---|---|---|
committer | 2020-05-05 03:28:18 +0000 | |
commit | 581928ff6ddd74a7374ff84c74e7db738364f266 (patch) | |
tree | fcd42de7223f478c2d6d8946033b90d1e58ffb9c /validate/validation/src | |
parent | 80abcefc5fb61361f9b28a34077f75ce68058db6 (diff) | |
parent | 1db7e72d979afa03bca38d3008f55246f8d6a6c1 (diff) |
Merge "Migrate to Yamlbeans"
Diffstat (limited to 'validate/validation/src')
-rw-r--r-- | validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java index e94de60a..9c46de86 100644 --- a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java +++ b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java @@ -47,7 +47,8 @@ import org.onap.cli.main.conf.OnapCliConstants; import org.onap.cli.moco.OnapCommandSample; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.yaml.snakeyaml.Yaml; +import org.onap.cli.fw.error.OnapCommandInvalidSchema; +import org.onap.cli.fw.utils.OnapCommandDiscoveryUtils; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -221,9 +222,9 @@ public class OnapValidationTest { List<OnapCommandSample> samples = new ArrayList<>(); Map<String, ?> values = null; try { - values = (Map<String, ?>) new Yaml().load(inputStream); - } catch (Exception e) { - throw new OnapCommandInvalidSample(fileName, e); + values = OnapCommandDiscoveryUtils.loadYaml(inputStream); + } catch (OnapCommandInvalidSchema e) { //NOSONAR + LOG.error("Failed to load schema file", e.getMessage()); } OnapCommandSample sample = new OnapCommandSample(); |