Fixes a bug due to r1797222. I missed in some cases the EntityListIterator

might not exist in the context (this seems still weird to me, but obviously 
there are cases...)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798060 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2017-06-08 13:49:23 +00:00
parent 17af201267
commit c7bda90601
@@ -44,7 +44,9 @@ public class PerformFindTests extends OFBizTestCase {
private List<GenericValue> getCompleteList(Map<String, Object> context) {
List<GenericValue> foundElements = new LinkedList<GenericValue>();
try (EntityListIterator listIt = (EntityListIterator) context.get("listIt")) {
foundElements = listIt.getCompleteList();
if (listIt != null) {
foundElements = listIt.getCompleteList();
}
} catch (GenericEntityException e) {
Debug.logError(" Failed to extract values from EntityListIterator after a performFind service", module);
}