mirror of https://github.com/apache/lucene.git
simplify
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1459646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
be4edb9ca4
commit
3a8318ccd1
|
@ -140,8 +140,9 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory {
|
|||
}
|
||||
cacheValue.doneWithDir = true;
|
||||
if (cacheValue.refCnt == 0) {
|
||||
cacheValue.refCnt++; // this will go back to 0 in close
|
||||
close(directory);
|
||||
closeDirectory(cacheValue);
|
||||
byDirectoryCache.remove(directory);
|
||||
byPathCache.remove(cacheValue.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue