summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2008-04-19 01:05:59 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2008-04-19 01:05:59 +0000
commit306960844b44eb1d922b3de703dac49d5638e0ca (patch)
tree70589d7e64776b20f23cf316ee386226e0b5dba8
parent6f9ccc356d24f21bff5675a5bc7bd228fc9f32a4 (diff)
downloadjackcess-306960844b44eb1d922b3de703dac49d5638e0ca.tar.gz
jackcess-306960844b44eb1d922b3de703dac49d5638e0ca.zip
oops was not updating entry size
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@335 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r--src/java/com/healthmarketscience/jackcess/SimpleIndex.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/SimpleIndex.java b/src/java/com/healthmarketscience/jackcess/SimpleIndex.java
index 4dee57c..35ef662 100644
--- a/src/java/com/healthmarketscience/jackcess/SimpleIndex.java
+++ b/src/java/com/healthmarketscience/jackcess/SimpleIndex.java
@@ -208,10 +208,13 @@ public class SimpleIndex extends Index {
@Override
public void addEntry(int idx, Entry entry) {
_entries.add(idx, entry);
+ _totalEntrySize += entry.size();
}
+ @Override
public void removeEntry(int idx) {
- _entries.remove(idx);
+ Entry oldEntry = _entries.remove(idx);
+ _totalEntrySize -= oldEntry.size();
}
}