From 571b4deb4e32b37703b7d40f3940887bc02709a3 Mon Sep 17 00:00:00 2001 From: mharindu Date: Mon, 21 Sep 2015 16:37:14 +0530 Subject: [PATCH] Refactored android policy compliance --- .../mobile/impl/android/AndroidPolicyMonitoringService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidPolicyMonitoringService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidPolicyMonitoringService.java index 0300dea48..49ff0ab17 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidPolicyMonitoringService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidPolicyMonitoringService.java @@ -69,8 +69,8 @@ public class AndroidPolicyMonitoringService implements PolicyMonitoringService { Gson gson = new Gson(); ComplianceFeature complianceFeature; - for (int i = 0; i < jsonArray.size(); i++) { - complianceFeature = gson.fromJson(jsonArray.get(i), ComplianceFeature.class); + for (JsonElement element : jsonArray) { + complianceFeature = gson.fromJson(element, ComplianceFeature.class); complianceFeatures.add(complianceFeature); }