From ade78959011ca628324fa351de2fb31e8602935a Mon Sep 17 00:00:00 2001 From: mharindu Date: Mon, 21 Sep 2015 16:26:10 +0530 Subject: [PATCH 1/6] Added data type check in android policy compliance --- .../impl/android/AndroidPolicyMonitoringService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 3c58c0c6e2..0300dea48c 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 @@ -59,7 +59,12 @@ public class AndroidPolicyMonitoringService implements PolicyMonitoringService { List complianceFeatures = new ArrayList(); // Parsing json string to get compliance features. - JsonElement jsonElement = new JsonParser().parse((String) compliancePayload); + JsonElement jsonElement; + if (compliancePayload instanceof String) { + jsonElement = new JsonParser().parse((String) compliancePayload); + } else { + throw new PolicyComplianceException("Invalid policy compliance payload"); + } JsonArray jsonArray = jsonElement.getAsJsonArray(); Gson gson = new Gson(); ComplianceFeature complianceFeature; From 571b4deb4e32b37703b7d40f3940887bc02709a3 Mon Sep 17 00:00:00 2001 From: mharindu Date: Mon, 21 Sep 2015 16:37:14 +0530 Subject: [PATCH 2/6] 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 0300dea48c..49ff0ab17d 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); } From d6ce49e289b1704a07781b73193dcd8d72ef0fd2 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Mon, 5 Oct 2015 20:35:07 +0530 Subject: [PATCH 3/6] Bumping the versions of all dependent component versions to their respective latests --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 34409e1cdf..271440476d 100644 --- a/pom.xml +++ b/pom.xml @@ -522,7 +522,7 @@ - 4.4.0 + 4.4.1 [4.4.0, 4.5.0) 1.5.4 @@ -553,22 +553,22 @@ 1.1.1 - 4.4.1 + 4.4.7 4.4.0 - 4.4.0 + 4.6.0 - 4.4.0 + 4.4.1 - 4.4.1 + 4.4.8 - 4.4.1 + 4.5.8 0.9.2-SNAPSHOT From b1d4050188ee50624a92427971574eccf32ba15f Mon Sep 17 00:00:00 2001 From: prabathabey Date: Tue, 6 Oct 2015 20:28:36 +0530 Subject: [PATCH 4/6] Upgrading carbon-multitenancy/carbon-identity versions --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 271440476d..d5b2dd6c64 100644 --- a/pom.xml +++ b/pom.xml @@ -559,10 +559,10 @@ 4.4.0 - 4.6.0 + 4.6.0-m2 - 4.4.1 + 4.5.0-m1 4.4.8 From 4ddc7e2a5d5497fa592b31d8a034ff30cd1f4a46 Mon Sep 17 00:00:00 2001 From: harshanl Date: Wed, 7 Oct 2015 16:59:26 +0530 Subject: [PATCH 5/6] updated cxfversion' --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d5b2dd6c64..03f61fdd7a 100644 --- a/pom.xml +++ b/pom.xml @@ -548,7 +548,7 @@ 7.0.34.wso2v2 - 2.6.1 + 2.7.16 1.9.0 1.1.1 From d0e3a03c83e10a05b81645f5726f02073116a0fd Mon Sep 17 00:00:00 2001 From: prabathabey Date: Wed, 7 Oct 2015 17:03:41 +0530 Subject: [PATCH 6/6] Upgrading cxf version in dependencies --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d5b2dd6c64..03f61fdd7a 100644 --- a/pom.xml +++ b/pom.xml @@ -548,7 +548,7 @@ 7.0.34.wso2v2 - 2.6.1 + 2.7.16 1.9.0 1.1.1