diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/AbstractGadgetDataServiceDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/AbstractGadgetDataServiceDAO.java index d41ba45a62a..c36877d9501 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/AbstractGadgetDataServiceDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/AbstractGadgetDataServiceDAO.java @@ -116,7 +116,7 @@ public abstract class AbstractGadgetDataServiceDAO implements GadgetDataServiceD public DeviceCountByGroupEntry getFeatureNonCompliantDeviceCount(String nonCompliantFeatureCode, FilterSet filterSet) throws InvalidParameterValueException, SQLException { - if (nonCompliantFeatureCode == null || "".equals(nonCompliantFeatureCode)) { + if (nonCompliantFeatureCode == null || nonCompliantFeatureCode.isEmpty()) { throw new InvalidParameterValueException("Non-compliant feature code should not be either null or empty."); } @@ -302,7 +302,7 @@ public abstract class AbstractGadgetDataServiceDAO implements GadgetDataServiceD getFeatureNonCompliantDeviceCountsByPlatforms(String nonCompliantFeatureCode, FilterSet filterSet) throws InvalidParameterValueException, SQLException { - if (nonCompliantFeatureCode == null || "".equals(nonCompliantFeatureCode)) { + if (nonCompliantFeatureCode == null || nonCompliantFeatureCode.isEmpty()) { throw new InvalidParameterValueException("Non-compliant feature code should not be either null or empty."); } @@ -416,7 +416,7 @@ public abstract class AbstractGadgetDataServiceDAO implements GadgetDataServiceD getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode, FilterSet filterSet) throws InvalidParameterValueException, SQLException { - if (nonCompliantFeatureCode == null || "".equals(nonCompliantFeatureCode)) { + if (nonCompliantFeatureCode == null || nonCompliantFeatureCode.isEmpty()) { throw new InvalidParameterValueException("Non-compliant feature code should not be either null or empty."); } @@ -531,7 +531,7 @@ public abstract class AbstractGadgetDataServiceDAO implements GadgetDataServiceD public List getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, FilterSet filterSet) throws InvalidParameterValueException, SQLException { - if (nonCompliantFeatureCode == null || "".equals(nonCompliantFeatureCode)) { + if (nonCompliantFeatureCode == null || nonCompliantFeatureCode.isEmpty()) { throw new InvalidParameterValueException("Non-compliant feature code should not be either null or empty."); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/GenericGadgetDataServiceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/GenericGadgetDataServiceDAOImpl.java index feb8b7024a6..9c2f6931864 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/GenericGadgetDataServiceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/GenericGadgetDataServiceDAOImpl.java @@ -188,7 +188,7 @@ public class GenericGadgetDataServiceDAOImpl extends AbstractGadgetDataServiceDA FilterSet filterSet, int startIndex, int resultCount) throws InvalidParameterValueException, SQLException { - if (nonCompliantFeatureCode == null || "".equals(nonCompliantFeatureCode)) { + if (nonCompliantFeatureCode == null || nonCompliantFeatureCode.isEmpty()) { throw new InvalidParameterValueException("Non-compliant feature code should not be either null or empty."); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/MSSQLGadgetDataServiceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/MSSQLGadgetDataServiceDAOImpl.java index b1a725e2bfa..74f0cc4ee6a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/MSSQLGadgetDataServiceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/MSSQLGadgetDataServiceDAOImpl.java @@ -190,7 +190,7 @@ public class MSSQLGadgetDataServiceDAOImpl extends AbstractGadgetDataServiceDAO FilterSet filterSet, int startIndex, int resultCount) throws InvalidParameterValueException, SQLException { - if (nonCompliantFeatureCode == null || "".equals(nonCompliantFeatureCode)) { + if (nonCompliantFeatureCode == null || nonCompliantFeatureCode.isEmpty()) { throw new InvalidParameterValueException("Non-compliant feature code should not be either null or empty."); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/OracleGadgetDataServiceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/OracleGadgetDataServiceDAOImpl.java index a84b906f341..a4284938d2b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/OracleGadgetDataServiceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/OracleGadgetDataServiceDAOImpl.java @@ -190,7 +190,7 @@ public class OracleGadgetDataServiceDAOImpl extends AbstractGadgetDataServiceDAO FilterSet filterSet, int startIndex, int resultCount) throws InvalidParameterValueException, SQLException { - if (nonCompliantFeatureCode == null || "".equals(nonCompliantFeatureCode)) { + if (nonCompliantFeatureCode == null || nonCompliantFeatureCode.isEmpty()) { throw new InvalidParameterValueException("Non-compliant feature code should not be either null or empty."); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/PostgreSQLGadgetDataServiceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/PostgreSQLGadgetDataServiceDAOImpl.java index 26986df2feb..e8c8570a0de 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/PostgreSQLGadgetDataServiceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/impl/PostgreSQLGadgetDataServiceDAOImpl.java @@ -188,7 +188,7 @@ public class PostgreSQLGadgetDataServiceDAOImpl extends AbstractGadgetDataServic FilterSet filterSet, int startIndex, int resultCount) throws InvalidParameterValueException, SQLException { - if (nonCompliantFeatureCode == null || "".equals(nonCompliantFeatureCode)) { + if (nonCompliantFeatureCode == null || nonCompliantFeatureCode.isEmpty()) { throw new InvalidParameterValueException("Non-compliant feature code should not be either null or empty."); }