mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@591160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b2544046c5
commit
229ca6afd7
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue