From 851fb355542c4133c31b3b831ff8c0c68216efb0 Mon Sep 17 00:00:00 2001 From: dilanua Date: Fri, 22 May 2015 04:28:26 +0530 Subject: [PATCH] Updated DeviceTypeDAOImpl.java --- .../carbon/device/mgt/core/dao/impl/DeviceTypeDAOImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceTypeDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceTypeDAOImpl.java index f2f0ac8937..814f7d44a4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceTypeDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/DeviceTypeDAOImpl.java @@ -67,7 +67,7 @@ public class DeviceTypeDAOImpl implements DeviceTypeDAO { Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; - List deviceTypes = null; + List deviceTypes = new ArrayList();; try { conn = this.getConnection(); String sql = "SELECT ID AS DEVICE_TYPE_ID, NAME AS DEVICE_TYPE FROM DM_DEVICE_TYPE"; @@ -75,7 +75,6 @@ public class DeviceTypeDAOImpl implements DeviceTypeDAO { rs = stmt.executeQuery(); while (rs.next()) { - deviceTypes = new ArrayList(); DeviceType deviceType = new DeviceType(); deviceType.setId(rs.getInt("DEVICE_TYPE_ID")); deviceType.setName(rs.getString("DEVICE_TYPE"));