[
https://issues.apache.org/jira/browse/LUCENE-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man updated LUCENE-1046:
-----------------------------
Component/s: (was: contrib/benchmark)
contrib/*
> Dead code in SpellChecker.java (branch never executes)
> ------------------------------------------------------
>
> Key: LUCENE-1046
> URL: https://issues.apache.org/jira/browse/LUCENE-1046
> Project: Lucene - Java
> Issue Type: Bug
> Components: contrib/*
> Affects Versions: 2.2
> Reporter: Joe
> Priority: Minor
>
> 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[] { word };
> }
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]