[ http://issues.apache.org/jira/browse/LUCENE-623?page=all ]
     
Hoss Man resolved LUCENE-623:
-----------------------------

    Resolution: Fixed

Patch commited.  

Note that this patch caused an NPE in TestIndexWriterMerging.testLucene, but 
after reviewing the test I'm of the opinion that it made an invalid assumption 
about the order of events that was allowed, to the effect of...


    Directory merged = new RAMDirectory();
    ...
    merged.close();
    ...
    IndexReader reader = IndexReader.open(merged);

...I modified the test slightly to only close the directory once all uses of it 
were finished and included it in the commit.

> RAMDirectory.close() should have a comment about not releasing any resources
> ----------------------------------------------------------------------------
>
>          Key: LUCENE-623
>          URL: http://issues.apache.org/jira/browse/LUCENE-623
>      Project: Lucene - Java
>         Type: Improvement

>   Components: Store
>     Versions: 1.9
>     Reporter: Heng Mei
>     Assignee: Hoss Man
>     Priority: Minor
>  Attachments: ramdirectory.diff
>
> I wrongly assumed that calling RAMDirectory.close() would free up the memory 
> occupied by the RAMDirectory.
> It might be helpful to add a javadoc comment that warns users that 
> RAMDirectory.close() is a no-op, since it might be a common assumption that 
> close() would release resources.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to