]> source.dussan.org Git - jackcess.git/commitdiff
update the bounds before updating the positions
authorJames Ahlborn <jtahlborn@yahoo.com>
Mon, 24 Mar 2008 02:29:58 +0000 (02:29 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Mon, 24 Mar 2008 02:29:58 +0000 (02:29 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@295 f203690c-595d-4dc9-a70b-905162fa7fd2

src/java/com/healthmarketscience/jackcess/Index.java

index fe8fa237da47e67f8a235cba5b975ccd24b8069b..020f42f90d74bc3d7dbc748b6d6a5ec021a535c9 100644 (file)
@@ -1677,7 +1677,6 @@ public class Index implements Comparable<Index> {
       _curPos = getDirHandler(moveForward).getBeginningPosition();
       _prevPos = _curPos;
       if(!isUpToDate()) {
-        // update bounds
         updateBounds();
         _lastModCount = Index.this._modCount;
       }
@@ -1737,12 +1736,12 @@ public class Index implements Comparable<Index> {
       if(!curEntry.equals(_curPos.getEntry()) ||
          !prevEntry.equals(_prevPos.getEntry()))
       {
-        _prevPos = updatePosition(prevEntry);
-        _curPos = updatePosition(curEntry);
         if(!isUpToDate()) {
           updateBounds();
           _lastModCount = Index.this._modCount;
         }
+        _prevPos = updatePosition(prevEntry);
+        _curPos = updatePosition(curEntry);
       } else {
         checkForModification();
       }
@@ -1753,9 +1752,9 @@ public class Index implements Comparable<Index> {
      */
     private void checkForModification() {
       if(!isUpToDate()) {
+        updateBounds();
         _prevPos = updatePosition(_prevPos.getEntry());
         _curPos = updatePosition(_curPos.getEntry());
-        updateBounds();
         _lastModCount = Index.this._modCount;
       }
     }