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 5c53d8129ab..4742548f66d 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 588f2ebd4a1..6e5ef3a5861 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 ")