lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@syr.edu>
Subject Re: Semantics of a closed IndexInput
Date Tue, 04 Apr 2006 19:59:36 GMT
So, I will take out this test and mark in the javadocs that accessing a 
field after the reader has been closed is undefined.

Does that seem reasonable?

Doug Cutting wrote:
> 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
>
>

-- 

Grant Ingersoll 
Sr. Software Engineer 
Center for Natural Language Processing 
Syracuse University 
School of Information Studies 
335 Hinds Hall 
Syracuse, NY 13244 

http://www.cnlp.org 
Voice:  315-443-5484 
Fax: 315-443-6886 


---------------------------------------------------------------------
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