lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Semantics of a closed IndexInput
Date Tue, 04 Apr 2006 17:16:22 GMT
Grant Ingersoll wrote:
>    try {
>      value = field.stringValue();
>      assertTrue("Should not be able to read value: " + value + " since 
> the reader is closed", false);
>    } catch (Exception e) {
>        }
  [ ... ]
> This test fails, and I don't think it should.  The assert in the try 
> block is activated.  What am I missing?

I think things are working correctly and the bug is in the test.

The behavior when accessing a closed IndexInput is undefined.  In 
practice, with buffered input, things will probably work fine up until 
the end of the buffer.

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message