FIX: Fix NPE in ModelAliasAll.iterator(), when
fieldsToExclude is null. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139871 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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 ModelEntity {
|
||||
}
|
||||
|
||||
public Iterator<String> iterator() {
|
||||
return fieldsToExclude.iterator();
|
||||
if (this.fieldsToExclude == null) {
|
||||
return Collections.<String>emptySet().iterator();
|
||||
} else {
|
||||
return fieldsToExclude.iterator();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user