ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doo...@apache.org
Subject svn commit: r1417210 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityListIterator.java
Date Tue, 04 Dec 2012 21:54:28 GMT
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();



Mime
View raw message