remove dead code: Document.getFields(String) cannot return null

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1176389 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-09-27 14:04:44 +00:00
parent fe3982c746
commit dc4450207f
1 changed files with 4 additions and 6 deletions

View File

@ -707,12 +707,10 @@ public final class MoreLikeThis {
if (vector == null) {
Document d = ir.document(docNum);
IndexableField fields[] = d.getFields(fieldName);
if (fields != null) {
for (int j = 0; j < fields.length; j++) {
final String stringValue = fields[j].stringValue();
if (stringValue != null) {
addTermFrequencies(new StringReader(stringValue), termFreqMap, fieldName);
}
for (int j = 0; j < fields.length; j++) {
final String stringValue = fields[j].stringValue();
if (stringValue != null) {
addTermFrequencies(new StringReader(stringValue), termFreqMap, fieldName);
}
}
} else {