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 f2f0ac89372..814f7d44a4d 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"));