From 4205ad18dd0d678fe194db22e6ffbed04985167b Mon Sep 17 00:00:00 2001 From: hasuniea Date: Tue, 2 Feb 2016 18:10:54 +0530 Subject: [PATCH] fixed issue in windowsUtil --- .../impl/windows/dao/impl/WindowsDeviceDAOImpl.java | 2 +- .../mgt/mobile/impl/windows/util/WindowsUtils.java | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/dao/impl/WindowsDeviceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/dao/impl/WindowsDeviceDAOImpl.java index c65e01e1f..d8039f67f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/dao/impl/WindowsDeviceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/dao/impl/WindowsDeviceDAOImpl.java @@ -216,7 +216,7 @@ public class WindowsDeviceDAOImpl implements MobileDeviceDAO { rs = stmt.executeQuery(); while (rs.next()) { - mobileDevice = WindowsUtils.loadMatchingMobileDevices(rs); + mobileDevice = WindowsUtils.loadMobileDevices(rs); Map propertyMap = new HashMap<>(); propertyMap.put(WindowsPluginConstants.CHANNEL_URI, rs.getString(WindowsPluginConstants.CHANNEL_URI)); propertyMap.put(WindowsPluginConstants.DEVICE_INFO, rs.getString(WindowsPluginConstants.DEVICE_INFO)); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/util/WindowsUtils.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/util/WindowsUtils.java index 346be69de..2adb82daf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/util/WindowsUtils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/util/WindowsUtils.java @@ -52,16 +52,4 @@ public class WindowsUtils { mobileDevice.setOsVersion(rs.getString(WindowsPluginConstants.LATITUDE)); return mobileDevice; } - - public static MobileDevice loadMatchingMobileDevices(ResultSet rs) throws SQLException { - MobileDevice mobileDevice = new MobileDevice(); - mobileDevice.setMobileDeviceId(rs.getString(WindowsPluginConstants.DEVICE_ID)); - mobileDevice.setVendor(rs.getString(WindowsPluginConstants.IMEI)); - mobileDevice.setLatitude(rs.getString(WindowsPluginConstants.IMSI)); - mobileDevice.setLongitude(rs.getString(WindowsPluginConstants.OS_VERSION)); - mobileDevice.setImei(rs.getString(WindowsPluginConstants.DEVICE_MODEL)); - mobileDevice.setImsi(rs.getString(WindowsPluginConstants.VENDOR)); - mobileDevice.setOsVersion(rs.getString(WindowsPluginConstants.LATITUDE)); - return mobileDevice; - } }