Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.2
-
None
-
None
-
New, Patch Available
Description
SpellChecker contains the following lines of code:
final int goalFreq = (morePopular && ir != null) ? ir.docFreq(new Term(field, word)) : 0;
// if the word exists in the real index and we don't care for word frequency, return the word itself
if (!morePopular && goalFreq > 0) {
return new String[]
;
}
The branch will never execute: the only way for goalFreq to be greater than zero is if morePopular is true, but if morePopular is true, the expression in the if statement evaluates to false.