svn commit: r1857095 - /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java

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

svn commit: r1857095 - /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java

Deepak Dixit-5
Author: deepak
Date: Mon Apr  8 05:37:54 2019
New Revision: 1857095

URL: http://svn.apache.org/viewvc?rev=1857095&view=rev
Log:
Reverted :Use try with resource for closing ‘EntityListIterator’
This commit causing 'ResultSet not open' while rendering list forms.
Scott's comments from ML:
You'll need to be careful with this one, based on the limited usage of the
iterator here it seems likely that it will be used again later in the
process.

Modified:
    ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1857095&r1=1857094&r2=1857095&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java Mon Apr  8 05:37:54 2019
@@ -1215,7 +1215,8 @@ public class FormRenderer {
         }
         int itemIndex = -1;
         if (iter instanceof EntityListIterator) {
-            try (EntityListIterator eli = (EntityListIterator) iter) {
+            EntityListIterator eli = (EntityListIterator) iter;
+            try {
                 if(eli.getResultsSizeAfterPartialList() > 0){
                     itemIndex++;
                 }