aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/main/java/org/onap
diff options
context:
space:
mode:
authorKanagaraj Manickam <kanagaraj.manickam@huawei.com>2020-12-16 04:25:37 +0000
committerGerrit Code Review <gerrit@onap.org>2020-12-16 04:25:37 +0000
commit1ade33bf7ca87020a6bc7a734d8d86961e332536 (patch)
treef7cee8f2036812a63fddbfd929ea5cc6de24c03c /framework/src/main/java/org/onap
parent58f72b930243fe2346551476ddc37fd6531df09c (diff)
parent3bd15af9248f3347ab43324ab2ccee9dbb945db3 (diff)
Merge "printyaml method fix"
Diffstat (limited to 'framework/src/main/java/org/onap')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java b/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java
index 5527f94f..6850fe3f 100644
--- a/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java
+++ b/framework/src/main/java/org/onap/cli/fw/output/print/OnapCommandPrint.java
@@ -32,6 +32,8 @@ import org.onap.cli.fw.error.OnapCommandOutputPrintingFailed;
import org.onap.cli.fw.output.OnapCommandPrintDirection;
import com.google.gson.JsonParser;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
@@ -275,20 +277,13 @@ public class OnapCommandPrint {
}
}
-
- /*
- required vulnerable fix
- jackson-dataformat-yaml:YAMLMapper is a sub component of jackson-databind
- jackson-databind is replaced with gson
- JIRA: CLI-251
- */
+
public String printYaml() throws OnapCommandOutputPrintingFailed {
- /* try {
+ try {
return new YAMLMapper().writeValueAsString(new ObjectMapper().readTree(this.printJson()));
} catch (IOException e) {
throw new OnapCommandOutputPrintingFailed(e); // NOSONAR
}
- */
- return ""; //NOSONAR
+
}
}