From f439543779cf2dfac0b68443aea921c55983bf48 Mon Sep 17 00:00:00 2001 From: sharath reddy Date: Wed, 23 Mar 2022 21:22:21 +0530 Subject: Fixed Minor Code Smells issues "Deprecated JsonParser" Issue-ID: CLI-439 Signed-off-by: sharath reddy Change-Id: I49fdc2fe1aa48ae78317aba94fdd7f0232334860 Signed-off-by: sharath reddy --- .../src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'profiles/http') diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java index dcc3082d..7780701c 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java @@ -304,10 +304,9 @@ public class OnapCommandHttpUtils { } public static String normalizeJson(String json) throws OnapCommandHttpInvalidRequestBody { - JsonParser jsonParser = new JsonParser(); JsonElement node; try { - node = jsonParser.parse(json); + node = JsonParser.parseString(json); normalizeJson(node); return gson.toJson(node); } catch (Exception e) { //NOSONAR -- cgit 1.2.3-korg