Author: doogie
Date: Sun Jun 26 18:11:32 2011
New Revision: 1139888
URL:
http://svn.apache.org/viewvc?rev=1139888&view=revLog:
FIX: Protect against a null return from getFieldDefs().
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityPlanner.java
ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectGroup.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityPlanner.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityPlanner.java?rev=1139888&r1=1139887&r2=1139888&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityPlanner.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/sql/EntityPlanner.java Sun Jun 26 18:11:32 2011
@@ -102,8 +102,10 @@ public class EntityPlanner extends Plann
if (groupBy == null) {
groupBy = Collections.emptyList();
}
- for (FieldDef fieldDef: selectGroup.getFieldDefs()) {
- addFieldDef(dve, groupBy, fieldDef.getAlias(), fieldDef);
+ if (selectGroup.getFieldDefs() != null) {
+ for (FieldDef fieldDef: selectGroup.getFieldDefs()) {
+ addFieldDef(dve, groupBy, fieldDef.getAlias(), fieldDef);
+ }
}
List<String> orderBy;
if (selectStatement.getOrderBy() == null) {
Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectGroup.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectGroup.java?rev=1139888&r1=1139887&r2=1139888&view=diff==============================================================================
--- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectGroup.java (original)
+++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/SelectGroup.java Sun Jun 26 18:11:32 2011
@@ -52,7 +52,7 @@ public final class SelectGroup extends A
}
public Collection<FieldDef> getFieldDefs() {
- return fieldDefs.values();
+ return fieldDefs != null ? fieldDefs.values() : null;
}
public Table getTable() {