From 037acbe5bb8922628f87aa8a1ec2685a2b083661 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Fri, 3 Jun 2016 01:43:21 +0530 Subject: [PATCH] fixing platform configuration appearing twice issue. --- .../device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java | 2 +- .../org/wso2/carbon/device/mgt/common/search/Condition.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java index 4cde53bad1..c10e82e762 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/ConfigurationServiceImpl.java @@ -59,8 +59,8 @@ public class ConfigurationServiceImpl implements ConfigurationManagementService List configList = config.getConfiguration(); if (configList == null) { configList = new ArrayList<>(); + configList.add(configurationEntry); } - configList.add(configurationEntry); config.setConfiguration(configList); return Response.status(Response.Status.OK).entity(config).build(); } catch (ConfigurationManagementException | PolicyManagementException e) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/search/Condition.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/search/Condition.java index 2cf03c5645..2007a3f121 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/search/Condition.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/search/Condition.java @@ -78,7 +78,7 @@ public class Condition { required = true) public String operator; - @ApiModelProperty(name = "conditions", value = "There can be many search options as shown in the sample JSON " + + @ApiModelProperty(name = "state", value = "There can be many search options as shown in the sample JSON " + "definition. The field that connects the independent search " + "options, is known as state.\n" + "The following values can be assigned to state.\n" +