From 332da4dff84a389e726e643b5caaac95da7adbba Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sat, 15 Oct 2011 23:35:52 +0000 Subject: [PATCH] remove iterator implementation git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1183768 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/document/Document.java | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/document/Document.java b/lucene/src/java/org/apache/lucene/document/Document.java index bb528aac998..c8d2a33dd58 100644 --- a/lucene/src/java/org/apache/lucene/document/Document.java +++ b/lucene/src/java/org/apache/lucene/document/Document.java @@ -47,25 +47,7 @@ public final class Document implements Iterable { @Override public Iterator iterator() { - - return new Iterator() { - private int fieldUpto = 0; - - @Override - public boolean hasNext() { - return fieldUpto < fields.size(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - - @Override - public IndexableField next() { - return fields.get(fieldUpto++); - } - }; + return fields.iterator(); } /**