From f01448d39635208aaacf749316b3db2875e2f2cd Mon Sep 17 00:00:00 2001 From: Pahansith Date: Tue, 27 Aug 2019 23:16:43 +0530 Subject: [PATCH] Change http method to get --- .../config/jaxrs/service/DeviceManagementConfigService.java | 2 +- .../device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/DeviceManagementConfigService.java b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/DeviceManagementConfigService.java index 5c53d8129a..4742548f66 100644 --- a/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/DeviceManagementConfigService.java +++ b/components/device-mgt/io.entgra.carbon.device.mgt.config.api/src/main/java/io/entgra/carbon/device/mgt/config/jaxrs/service/DeviceManagementConfigService.java @@ -79,7 +79,7 @@ public interface DeviceManagementConfigService { @GET @ApiOperation( produces = MediaType.APPLICATION_JSON, - httpMethod = "POST", + httpMethod = "GET", value = "Getting General device Configurations", notes = "This API is responsible for send device configuration data to an IOT device when the " + "device starts provisioning", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java index 588f2ebd4a..6e5ef3a586 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java @@ -354,10 +354,10 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO { "p.DEVICE_TYPE_NAME, " + "p.TENANT_ID"; - AtomicInteger iterationCount = new AtomicInteger(0); + int iterationCount = 0; StringBuilder propertyQuery = new StringBuilder(" "); for (Map.Entry stringStringEntry : deviceProps.entrySet()) { - String tempTableId = "t".concat(Integer.toString(iterationCount.getAndIncrement())); + String tempTableId = "t".concat(Integer.toString(iterationCount++)); propertyQuery.append("JOIN DM_DEVICE_PROPERTIES ") .append(tempTableId).append(" ").append("ON p.DEVICE_IDENTIFICATION = ") .append(tempTableId).append(".DEVICE_IDENTIFICATION ")