git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@591160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-11-01 22:42:33 +00:00
parent b2544046c5
commit 229ca6afd7
1 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,7 @@ class HashPage {
private int binId;
private int persistedSize;
private List<HashEntry> hashIndexEntries;
private static final HashEntry nullEntry = new HashEntry();
/*
* for persistence only
*/
@ -192,6 +193,11 @@ class HashPage {
void addHashEntry(int index, HashEntry entry) throws IOException {
// index = index >= 0 ? index : 0;
// index = (index == 0 || index< size()) ? index : size()-1;
if (index > hashIndexEntries.size()) {
for (int i = hashIndexEntries.size(); i < (index+1);i++) {
hashIndexEntries.add(nullEntry);
}
}
hashIndexEntries.add(index, entry);
}