Improved: UtilValidate isEmpty and isNotEmpty methods not used correctly
(OFBIZ-8413) Thanks Pawan Verma for your contribution. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1766868 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1937,7 +1937,7 @@ public class DatabaseUtil {
|
||||
// first rename the column
|
||||
String tempName = makeTempFieldName(field);
|
||||
String renamedErr = renameColumn(entity, field, tempName);
|
||||
if (!UtilValidate.isEmpty(renamedErr)) {
|
||||
if (UtilValidate.isNotEmpty(renamedErr)) {
|
||||
if (messages != null) messages.add(renamedErr);
|
||||
Debug.logError(renamedErr, module);
|
||||
return;
|
||||
@@ -1945,7 +1945,7 @@ public class DatabaseUtil {
|
||||
|
||||
// next add back in the column
|
||||
String addedErr = addColumn(entity, field);
|
||||
if (!UtilValidate.isEmpty(addedErr)) {
|
||||
if (UtilValidate.isNotEmpty(addedErr)) {
|
||||
if (messages != null) messages.add(addedErr);
|
||||
Debug.logError(addedErr, module);
|
||||
return;
|
||||
@@ -2359,7 +2359,7 @@ public class DatabaseUtil {
|
||||
public void createPrimaryKey(ModelEntity entity, boolean usePkConstraintNames, int constraintNameClipLength, List<String> messages) {
|
||||
if (messages == null) messages = new ArrayList<String>();
|
||||
String err = createPrimaryKey(entity, usePkConstraintNames, constraintNameClipLength);
|
||||
if (!UtilValidate.isEmpty(err)) {
|
||||
if (UtilValidate.isNotEmpty(err)) {
|
||||
messages.add(err);
|
||||
}
|
||||
}
|
||||
@@ -2433,7 +2433,7 @@ public class DatabaseUtil {
|
||||
public void deletePrimaryKey(ModelEntity entity, boolean usePkConstraintNames, int constraintNameClipLength, List<String> messages) {
|
||||
if (messages == null) messages = new ArrayList<String>();
|
||||
String err = deletePrimaryKey(entity, usePkConstraintNames, constraintNameClipLength);
|
||||
if (!UtilValidate.isEmpty(err)) {
|
||||
if (UtilValidate.isNotEmpty(err)) {
|
||||
messages.add(err);
|
||||
}
|
||||
}
|
||||
@@ -2622,7 +2622,7 @@ public class DatabaseUtil {
|
||||
public void deleteDeclaredIndices(ModelEntity entity, List<String> messages) {
|
||||
if (messages == null) messages = new ArrayList<String>();
|
||||
String err = deleteDeclaredIndices(entity);
|
||||
if (!UtilValidate.isEmpty(err)) {
|
||||
if (UtilValidate.isNotEmpty(err)) {
|
||||
messages.add(err);
|
||||
}
|
||||
}
|
||||
@@ -2819,7 +2819,7 @@ public class DatabaseUtil {
|
||||
public void deleteForeignKeyIndices(ModelEntity entity, List<String> messages) {
|
||||
if (messages == null) messages = new ArrayList<String>();
|
||||
String err = deleteForeignKeyIndices(entity, datasourceInfo.getConstraintNameClipLength());
|
||||
if (!UtilValidate.isEmpty(err)) {
|
||||
if (UtilValidate.isNotEmpty(err)) {
|
||||
messages.add(err);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user