svn commit: r1798060 - /ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/test/PerformFindTests.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1798060 - /ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/test/PerformFindTests.java

jleroux@apache.org
Author: jleroux
Date: Thu Jun  8 13:49:23 2017
New Revision: 1798060

URL: http://svn.apache.org/viewvc?rev=1798060&view=rev
Log:
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...)

Modified:
    ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/test/PerformFindTests.java

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/test/PerformFindTests.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/test/PerformFindTests.java?rev=1798060&r1=1798059&r2=1798060&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/test/PerformFindTests.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/test/PerformFindTests.java Thu Jun  8 13:49:23 2017
@@ -44,7 +44,9 @@ public class PerformFindTests extends OF
     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);
         }