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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]