reverting update to non-deprecated method as it was not backwards compatible with lucene-2.0

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@478303 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Wolfgang Hoschek 2006-11-22 19:48:24 +00:00
parent e7ed9203c0
commit 4002514600
1 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ import java.io.InputStreamReader;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Enumeration;
import java.util.LinkedHashSet;
import java.util.Set;
@ -366,9 +366,9 @@ public class MemoryIndexTest extends TestCase {
private MemoryIndex createMemoryIndex(Document doc) {
MemoryIndex index = new MemoryIndex();
Iterator iter = doc.getFields().iterator();
while (iter.hasNext()) {
Field field = (Field) iter.next();
Enumeration iter = doc.fields();
while (iter.hasMoreElements()) {
Field field = (Field) iter.nextElement();
index.addField(field.name(), field.stringValue(), analyzer);
}
return index;