Fix npe for above

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@591145 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-11-01 21:23:44 +00:00
parent 30fe17834c
commit 9a491bbc76
1 changed files with 1 additions and 1 deletions

View File

@ -77,6 +77,7 @@ public class HashIndex implements Index {
public HashIndex(File directory, String name, IndexManager indexManager) throws IOException {
this.directory = directory;
this.name = name;
this.indexManager = indexManager;
openIndexFile();
pageCache = new LRUCache<Long, HashPage>(pageCacheSize, pageCacheSize, 0.75f, true);
}
@ -176,7 +177,6 @@ public class HashIndex implements Index {
public synchronized void load() {
if (loaded.compareAndSet(false, true)) {
this.indexManager = indexManager;
int capacity = 1;
while (capacity < numberOfBins) {
capacity <<= 1;