Replacing .equals with .isEmpty empty string check in Detdashboard analytics feature

revert-70aa11f8
dilanua 9 years ago
parent 3bec779e0b
commit c90f4471a8

@ -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<DetailedDeviceEntry> 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.");
}

@ -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.");
}

@ -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.");
}

@ -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.");
}

@ -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.");
}

Loading…
Cancel
Save