From f32bdf40219eb6dcbe0e9ac4c87496f0b6edb264 Mon Sep 17 00:00:00 2001 From: hasuniea Date: Tue, 2 Feb 2016 18:24:27 +0530 Subject: [PATCH] fixed code issues --- .../mgt/mobile/impl/windows/WindowsDeviceManager.java | 5 ++--- .../mgt/mobile/impl/windows/util/WindowsUtils.java | 11 ----------- 2 files changed, 2 insertions(+), 14 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/WindowsDeviceManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java index a5378f0fd..ef58d96c4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java @@ -298,9 +298,8 @@ public class WindowsDeviceManager implements DeviceManager { } } catch (MobileDeviceManagementDAOException e) { WindowsDAOFactory.rollbackTransaction(); - String msg = - "Error while enrolling the windows device : " + device.getDeviceIdentifier(); - throw new DeviceManagementException(msg, e); + throw new DeviceManagementException("Error while enrolling the windows device : " + + device.getDeviceIdentifier(), e); } return status; } 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 2adb82daf..2df597f91 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 @@ -22,24 +22,13 @@ import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.Map; /** * Contains utility methods which are used by Windows plugin. */ public class WindowsUtils { - public static String getDeviceProperty(Map deviceProperties, String property) { - - String deviceProperty = deviceProperties.get(property); - if (deviceProperty == null) { - return null; - } - return deviceProperty; - } - public static MobileDevice loadMobileDevices(ResultSet rs) throws SQLException { - MobileDevice mobileDevice = new MobileDevice(); mobileDevice.setMobileDeviceId(rs.getString(WindowsPluginConstants.DEVICE_ID)); mobileDevice.setImei(rs.getString(WindowsPluginConstants.IMEI));