we don't want to throw an exception on closed in release

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1421088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-12-13 07:13:06 +00:00
parent 59feed03d6
commit 02dfa0a4a8
1 changed files with 2 additions and 3 deletions

View File

@ -150,9 +150,8 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory {
private void close(Directory directory) throws IOException {
synchronized (this) {
if (closed) {
throw new RuntimeException("Already closed");
}
// don't check if already closed here - we need to able to release
// while #close() waits.
CacheValue cacheValue = byDirectoryCache.get(directory);
if (cacheValue == null) {