You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2011/06/26 20:09:38 UTC

svn commit: r1139871 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java

Author: doogie
Date: Sun Jun 26 18:09:38 2011
New Revision: 1139871

URL: http://svn.apache.org/viewvc?rev=1139871&view=rev
Log:
FIX: Fix NPE in ModelAliasAll.iterator(), when
fieldsToExclude is null.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?rev=1139871&r1=1139870&r2=1139871&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java Sun Jun 26 18:09:38 2011
@@ -21,6 +21,7 @@ package org.ofbiz.entity.model;
 import java.io.Serializable;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -792,7 +793,11 @@ public class ModelViewEntity extends Mod
         }
 
         public Iterator<String> iterator() {
-            return fieldsToExclude.iterator();
+            if (this.fieldsToExclude == null) {
+                return Collections.<String>emptySet().iterator();
+            } else {
+                return fieldsToExclude.iterator();
+            }
         }
     }