]> source.dussan.org Git - jackcess.git/commitdiff
minor cleanups
authorJames Ahlborn <jtahlborn@yahoo.com>
Wed, 19 Mar 2008 01:52:42 +0000 (01:52 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Wed, 19 Mar 2008 01:52:42 +0000 (01:52 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@285 f203690c-595d-4dc9-a70b-905162fa7fd2

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

index 5df3277fca06f7ad647abe979e0a6e0205136ae5..4307279fe4e7f8760386935ae196e88c234b6860 100644 (file)
@@ -40,7 +40,6 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.SortedSet;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
index 96926cc87bb11af1e7f3727e3dd69a8de0a64d65..6523bc100868cb4c16d5c7f6035227278c249744 100644 (file)
@@ -1125,12 +1125,11 @@ public class Table
       }
     }
     
+    ByteBuffer dataPage = null;
     int pageNumber = PageChannel.INVALID_PAGE_NUMBER;
-    int rowSize;
 
     // find last data page (Not bothering to check other pages for free
     // space.)
-    ByteBuffer dataPage = null;
     UsageMap.PageCursor revPageCursor = _ownedPages.cursor();
     revPageCursor.afterLast();
     while(true) {
@@ -1156,7 +1155,7 @@ public class Table
     }
     
     for (int i = 0; i < rowData.length; i++) {
-      rowSize = rowData[i].remaining();
+      int rowSize = rowData[i].remaining();
       int rowSpaceUsage = getRowSpaceUsage(rowSize, getFormat());
       short freeSpaceInPage = dataPage.getShort(getFormat().OFFSET_FREE_SPACE);
       if (freeSpaceInPage < rowSpaceUsage) {