hasuniea 9 years ago
commit 1a777941fc

@ -59,13 +59,18 @@ public class AndroidPolicyMonitoringService implements PolicyMonitoringService {
List<ComplianceFeature> complianceFeatures = new ArrayList<ComplianceFeature>(); List<ComplianceFeature> complianceFeatures = new ArrayList<ComplianceFeature>();
// Parsing json string to get compliance features. // 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(); JsonArray jsonArray = jsonElement.getAsJsonArray();
Gson gson = new Gson(); Gson gson = new Gson();
ComplianceFeature complianceFeature; ComplianceFeature complianceFeature;
for (int i = 0; i < jsonArray.size(); i++) { for (JsonElement element : jsonArray) {
complianceFeature = gson.fromJson(jsonArray.get(i), ComplianceFeature.class); complianceFeature = gson.fromJson(element, ComplianceFeature.class);
complianceFeatures.add(complianceFeature); complianceFeatures.add(complianceFeature);
} }

@ -522,7 +522,7 @@
<properties> <properties>
<!--Carbon kernel versions--> <!--Carbon kernel versions-->
<carbon.kernel.version>4.4.0</carbon.kernel.version> <carbon.kernel.version>4.4.1</carbon.kernel.version>
<carbon.kernel.version.range>[4.4.0, 4.5.0)</carbon.kernel.version.range> <carbon.kernel.version.range>[4.4.0, 4.5.0)</carbon.kernel.version.range>
<carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version> <carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version>
@ -548,27 +548,27 @@
<orbit.tomcat.jdbc.pooling.version>7.0.34.wso2v2</orbit.tomcat.jdbc.pooling.version> <orbit.tomcat.jdbc.pooling.version>7.0.34.wso2v2</orbit.tomcat.jdbc.pooling.version>
<!-- CXF version --> <!-- CXF version -->
<cxf.version>2.6.1</cxf.version> <cxf.version>2.7.16</cxf.version>
<jackson.version>1.9.0</jackson.version> <jackson.version>1.9.0</jackson.version>
<javax.ws.rs.version>1.1.1</javax.ws.rs.version> <javax.ws.rs.version>1.1.1</javax.ws.rs.version>
<!-- Carbon Commons --> <!-- Carbon Commons -->
<carbon.commons.version>4.4.1</carbon.commons.version> <carbon.commons.version>4.4.7</carbon.commons.version>
<!-- Carbon Deployment --> <!-- Carbon Deployment -->
<carbon.deployment.version>4.4.0</carbon.deployment.version> <carbon.deployment.version>4.4.0</carbon.deployment.version>
<!-- Identity --> <!-- Identity -->
<carbon.identity.version>4.4.0</carbon.identity.version> <carbon.identity.version>4.6.0-m2</carbon.identity.version>
<!-- Multi-tenancy --> <!-- Multi-tenancy -->
<carbon.multitenancy.version>4.4.0</carbon.multitenancy.version> <carbon.multitenancy.version>4.5.0-m1</carbon.multitenancy.version>
<!-- Registry --> <!-- Registry -->
<carbon.registry.version>4.4.1</carbon.registry.version> <carbon.registry.version>4.4.8</carbon.registry.version>
<!-- Governance --> <!-- Governance -->
<carbon.governance.version>4.4.1</carbon.governance.version> <carbon.governance.version>4.5.8</carbon.governance.version>
<!-- Device Management --> <!-- Device Management -->
<carbon.device.mgt.version>0.9.2-SNAPSHOT</carbon.device.mgt.version> <carbon.device.mgt.version>0.9.2-SNAPSHOT</carbon.device.mgt.version>

Loading…
Cancel
Save