protected final void ensureOpen() throws AlreadyClosedException {
  if (refCount.get() <= 0) {
    throw new AlreadyClosedException("this IndexReader is closed");
  }
  if (closedByChild) {
    throw new AlreadyClosedException("this IndexReader cannot be used anymore as one of its child readers was closed");
  }
}

protected final void ensureOpen ( ) throws AlreadyClosedException { if ( refCount . get ( ) <= 0 ) { throw new AlreadyClosedException ( "this IndexReader is closed" ) ; } if ( closedByChild ) { throw new AlreadyClosedException ( "this IndexReader cannot be used anymore as one of its child readers was closed" ) ; } }
throws alreadyclosedexception if this indexreader or any of its child readers is closed , otherwise returns .
