You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/12/04 22:54:28 UTC

svn commit: r1417210 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java

Author: doogie
Date: Tue Dec  4 21:54:28 2012
New Revision: 1417210

URL: http://svn.apache.org/viewvc?rev=1417210&view=rev
Log:
FIX: Some jdbc drivers don't like absolute(0), even though this is
allowed.  As such, call beforeFirst() instead.  Technically, these
broken jdbc drivers should have the same kind of work-around.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java?rev=1417210&r1=1417209&r2=1417210&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java Tue Dec  4 21:54:28 2012
@@ -211,7 +211,12 @@ public class EntityListIterator implemen
         if (closed) throw new GenericResultSetClosedException("This EntityListIterator has been closed, this operation cannot be performed");
 
         try {
-            return resultSet.absolute(rowNum);
+            if (rowNum == 0) {
+                resultSet.beforeFirst();
+                return true;
+            } else {
+                return resultSet.absolute(rowNum);
+            }
         } catch (SQLException e) {
             if (!closed) {
                 this.close();