diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsPolicyMonitoringService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsPolicyMonitoringService.java index fd14cf3e6..ecc9e36ad 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsPolicyMonitoringService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsPolicyMonitoringService.java @@ -18,10 +18,6 @@ package org.wso2.carbon.device.mgt.mobile.impl.windows; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonParser; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.Device; @@ -56,16 +52,7 @@ public class WindowsPolicyMonitoringService implements PolicyMonitoringService { return complianceData; } List complianceFeatures = new ArrayList(); - - JsonElement jsonElement = new JsonParser().parse(compliancePayload.toString()); - JsonArray jsonArray = jsonElement.getAsJsonArray(); - Gson gson = new Gson(); - ComplianceFeature complianceFeature; - for (int x = 0; x < jsonArray.size(); x++) { - complianceFeature = gson.fromJson(jsonArray.get(x), ComplianceFeature.class); - complianceFeatures.add(complianceFeature); - } - complianceData.setComplianceFeatures(complianceFeatures); + complianceData.setComplianceFeatures((List) compliancePayload); for (ComplianceFeature cf : complianceFeatures) { if (!cf.isCompliant()) {