From 86655234bc3de66c76e120e2235ad1d06bb89aab Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 8 Feb 2022 10:27:51 +0100 Subject: [PATCH] Do not instantiate JsonParser Use parseString() static method instead of using the deprecated instance method. Change-Id: Ica84e1d21bbb229b800a89fd11ce53d61f077883 Signed-off-by: Robert Varga --- .../southboundcli/cli/GetReconciliationStateProvider.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/cli/GetReconciliationStateProvider.java b/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/cli/GetReconciliationStateProvider.java index 587f7d9666..fc702852fe 100644 --- a/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/cli/GetReconciliationStateProvider.java +++ b/applications/southbound-cli/src/main/java/org/opendaylight/openflowplugin/applications/southboundcli/cli/GetReconciliationStateProvider.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.openflowplugin.applications.southboundcli.cli; import com.google.common.net.InetAddresses; @@ -154,7 +153,7 @@ public class GetReconciliationStateProvider extends OsgiCommandSupport { try { String getReconcilationRemoteResponse = invokeRemoteRestOperation(ipAddress); if (getReconcilationRemoteResponse != null) { - JsonElement rootObj = new JsonParser().parse(getReconcilationRemoteResponse); + JsonElement rootObj = JsonParser.parseString(getReconcilationRemoteResponse); String remoteJMXOperationResult = rootObj.getAsJsonObject().get("value").toString(); Type type = new TypeToken>() {}.getType(); jmxReconciliationStates.putAll(new Gson().fromJson(remoteJMXOperationResult, type)); -- 2.36.6