Do not instantiate JsonParser
[openflowplugin.git] / applications / southbound-cli / src / main / java / org / opendaylight / openflowplugin / applications / southboundcli / cli / GetReconciliationStateProvider.java
index 587f7d9666a4ce567d845b8834b864bb9d11e880..fc702852fe54742dee0a1d1b029bf88853205da1 100644 (file)
@@ -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<HashMap<String, String>>() {}.getType();
                 jmxReconciliationStates.putAll(new Gson().fromJson(remoteJMXOperationResult, type));