Fix test failure, the wrapping really found a bug. It's the same like in SlowCompositeReaderWrapper:

ant test -Dtestcase=TestReaderClosed -Dtestmethod=test -Dtests.seed=-7c9f33395d707a4a:9a8a104377eade3:-6839e18852fad654 -Dtests.multiplier=3 -Dtests.nightly=true -Dargs="-Dfile.encoding=ISO8859-1"
Was found by Jenkins!

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1245770 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-02-17 21:29:12 +00:00
parent 18fbe0ef3e
commit 8ff8ea00bb
1 changed files with 5 additions and 0 deletions

View File

@ -191,6 +191,11 @@ public final class ParallelAtomicReader extends AtomicReader {
@Override
public Fields fields() {
ensureOpen();
// we cache the inner field instances, so we must check
// that the delegate readers are really still open:
for (final AtomicReader reader : parallelReaders) {
reader.ensureOpen();
}
return fields;
}