DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16364

Return multiple fields in Document

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From [EMAIL PROTECTED]  2003-01-25 16:22 -------
Sorry, I missed that in my copy... However, the implementation uses Collections
framework. Below is the code rewritten using JDK1.1.x Vector:

   public final Field[] getFields(String name) {
     Vector tempFieldList = new Vector();
     for (DocumentFieldList list = fieldList; list != null; list = list.next) {
       if (list.field.name().equals(name)) {
         tempFieldList.add(list.field);
       }
     }
     int fieldCount = tempFieldList.size();
     if (fieldCount == 0)
       return null;
     else {
       Field[] fields = new Field[fieldCount];
       tempFieldList.copyInto(fields);
       return fields;
     }
   }

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

Reply via email to