don't use deprecated method (thanks to Simon Willnauer)

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@431976 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2006-08-16 18:31:36 +00:00
parent 3308763643
commit 7a90732466
1 changed files with 4 additions and 3 deletions

View File

@ -62,9 +62,10 @@ final class FieldInfos {
/** Adds field info for a Document. */
public void add(Document doc) {
Enumeration fields = doc.fields();
while (fields.hasMoreElements()) {
Fieldable field = (Fieldable) fields.nextElement();
List fields = doc.getFields();
Iterator fieldIterator = fields.iterator();
while (fieldIterator.hasNext()) {
Fieldable field = (Fieldable) fieldIterator.next();
add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWithTermVector(),
field.isStoreOffsetWithTermVector(), field.getOmitNorms());
}