You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Rob Staveley (Tom) (JIRA)" <ji...@apache.org> on 2006/06/09 10:28:30 UTC

[jira] Created: (LUCENE-594) Javadoc - Field constructor with Reader needs comment about retained reference

Javadoc - Field constructor with Reader needs comment about retained reference
------------------------------------------------------------------------------

         Key: LUCENE-594
         URL: http://issues.apache.org/jira/browse/LUCENE-594
     Project: Lucene - Java
        Type: Improvement

  Components: Index  
    Versions: 2.0.0    
    Reporter: Rob Staveley (Tom)
    Priority: Minor


If you don't dig into the Lucene internals, it isn't obvious the Field constructor http://lucene.apache.org/java/docs/api/org/apache/lucene/document/Field.html#Field%28java.lang.String,%20java.io.Reader%29 retains a reference to the reader for use later on. It would be useful to have a comment added to the Javadoc saying something like:

Note: A reference to java.io.Reader is retained by the field. Reader is read from when the Document which this field is added to is itself added to the index.

Without this, the caller is liable to do silly things like closing the stream after constructing the org.apache.lucene.document.Field.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-594) Javadoc - Field constructor with Reader needs comment about retained reference

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENE-594?page=all ]
     
Otis Gospodnetic resolved LUCENE-594:
-------------------------------------

    Resolution: Fixed

I already did this yesterday, I believe.  Thanks!


> Javadoc - Field constructor with Reader needs comment about retained reference
> ------------------------------------------------------------------------------
>
>          Key: LUCENE-594
>          URL: http://issues.apache.org/jira/browse/LUCENE-594
>      Project: Lucene - Java
>         Type: Improvement

>   Components: Index
>     Versions: 2.0.0
>     Reporter: Rob Staveley (Tom)
>     Priority: Minor

>
> If you don't dig into the Lucene internals, it isn't obvious the Field constructor http://lucene.apache.org/java/docs/api/org/apache/lucene/document/Field.html#Field%28java.lang.String,%20java.io.Reader%29 retains a reference to the reader for use later on. It would be useful to have a comment added to the Javadoc saying something like:
> Note: A reference to java.io.Reader is retained by the field. Reader is read from when the Document which this field is added to is itself added to the index.
> Without this, the caller is liable to do silly things like closing the stream after constructing the org.apache.lucene.document.Field.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org