Author: jleroux
Date: Mon Sep 24 11:44:20 2007
New Revision: 578898
URL:
http://svn.apache.org/viewvc?rev=578898&view=revLog:
Applied fix from trunk for revision: 578874
Modified:
ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java
Modified: ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java?rev=578898&r1=578897&r2=578898&view=diff==============================================================================
--- ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java (original)
+++ ofbiz/branches/release4.0/framework/entity/src/org/ofbiz/entity/util/EntityUtil.java Mon Sep 24 11:44:20 2007
@@ -469,13 +469,15 @@
while (genericValueIter.hasNext()) {
GenericValue value = (GenericValue) genericValueIter.next();
Object fieldValue = value.get(fieldName);
- if (distinct) {
- if (!distinctSet.contains(fieldValue)) {
+ if (fieldValue != null) {
+ if (distinct) {
+ if (!distinctSet.contains(fieldValue)) {
+ fieldList.add(fieldValue);
+ distinctSet.add(fieldValue);
+ }
+ } else {
fieldList.add(fieldValue);
- distinctSet.add(fieldValue);
}
- } else {
- fieldList.add(fieldValue);
}
}
@@ -495,13 +497,15 @@
GenericValue value = null;
while ((value = (GenericValue) genericValueEli.next()) != null) {
Object fieldValue = value.get(fieldName);
- if (distinct) {
- if (!distinctSet.contains(fieldValue)) {
+ if (fieldValue != null) {
+ if (distinct) {
+ if (!distinctSet.contains(fieldValue)) {
+ fieldList.add(fieldValue);
+ distinctSet.add(fieldValue);
+ }
+ } else {
fieldList.add(fieldValue);
- distinctSet.add(fieldValue);
}
- } else {
- fieldList.add(fieldValue);
}
}