From f1eca17991f400b2f97954c5a75a96e4ff9ebfa3 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Wed, 22 Jun 2016 14:57:12 +0530 Subject: [PATCH] Code cleanup --- .../device/mgt/core/search/mgt/impl/Utils.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/search/mgt/impl/Utils.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/search/mgt/impl/Utils.java index 17990ff6fb..4c73b33cf7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/search/mgt/impl/Utils.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/search/mgt/impl/Utils.java @@ -32,7 +32,6 @@ public class Utils { private static Map locationColumnsMap = new HashMap<>(); static { - genericColumnsMap.put("deviceModel", "DEVICE_MODEL"); genericColumnsMap.put("vendor", "VENDOR"); genericColumnsMap.put("osVersion", "OS_VERSION"); @@ -105,23 +104,11 @@ public class Utils { } public static boolean checkDeviceDetailsColumns(String str) { - if (genericColumnsMap.containsKey(str)) { - return true; - } - if (genericColumnsMap.containsValue(str)) { - return true; - } - return false; + return genericColumnsMap.containsKey(str) || genericColumnsMap.containsValue(str); } public static boolean checkDeviceLocationColumns(String str) { - if (locationColumnsMap.containsKey(str)) { - return true; - } - if (locationColumnsMap.containsValue(str)) { - return true; - } - return false; + return locationColumnsMap.containsKey(str) || locationColumnsMap.containsValue(str); } public static List convertStringToList(String str) {