From 0de6ff09e7c5fe50091ca07f65361c44934d59d8 Mon Sep 17 00:00:00 2001 From: manoj Date: Tue, 9 Jun 2015 16:37:52 +0530 Subject: [PATCH] Change get device by name query --- .../org/wso2/carbon/device/mgt/core/dao/impl/DeviceDAOImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceDAOImpl.java index 31857fc330..3f88fa6e60 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceDAOImpl.java @@ -373,7 +373,7 @@ public class DeviceDAOImpl implements DeviceDAO { while (resultSet.next()) { Device device = new Device(); DeviceType deviceType = new DeviceType(); - int id = resultSet.getInt(resultSet.getInt(1)); + int id = resultSet.getInt(1); deviceType.setId(id); deviceType.setName(resultSet.getString(2)); device.setId(resultSet.getInt(3));