Author: adrianc
Date: Mon May 7 00:13:35 2012
New Revision: 1334840
URL:
http://svn.apache.org/viewvc?rev=1334840&view=revLog:
Minor code cleanup in ObjectType.java.
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java?rev=1334840&r1=1334839&r2=1334840&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/ObjectType.java Mon May 7 00:13:35 2012
@@ -563,17 +563,19 @@ public class ObjectType {
Debug.logWarning("The specified type [" + type + "] is not a valid class or a known special type, may see more errors later because of this: " + e.getMessage(), module);
}
- // some default behavior for null values, results in a bit cleaner operation
- if ("is-null".equals(operator) && value1 == null) {
- return Boolean.TRUE;
- } else if ("is-not-null".equals(operator) && value1 == null) {
- return Boolean.FALSE;
- } else if ("is-empty".equals(operator) && value1 == null) {
- return Boolean.TRUE;
- } else if ("is-not-empty".equals(operator) && value1 == null) {
- return Boolean.FALSE;
- } else if ("contains".equals(operator) && value1 == null) {
- return Boolean.FALSE;
+ if (value1 == null) {
+ // some default behavior for null values, results in a bit cleaner operation
+ if ("is-null".equals(operator)) {
+ return Boolean.TRUE;
+ } else if ("is-not-null".equals(operator)) {
+ return Boolean.FALSE;
+ } else if ("is-empty".equals(operator)) {
+ return Boolean.TRUE;
+ } else if ("is-not-empty".equals(operator)) {
+ return Boolean.FALSE;
+ } else if ("contains".equals(operator)) {
+ return Boolean.FALSE;
+ }
}
int result = 0;