Author: jleroux
Date: Fri Dec 14 15:33:43 2018
New Revision: 1848954
URL:
http://svn.apache.org/viewvc?rev=1848954&view=revLog:
Fixed: FindGeneric page broken
(OFBIZ-10711)
Due to r1848673 for "Fix or Silence various warnings" (OFBIZ-10701)
a try-with-resources was used but the Object passed in context (an
EntityListIterator) should not be close there. It's reused in
FindGeneric.groovy:107 by a performFind service defined in the
dynamicAutoEntityFieldListForm String.
Thanks: Deepak Dixit for report.
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=1848954&r1=1848953&r2=1848954&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 Fri Dec 14 15:33:43 2018
@@ -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++;
}