lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Harhen <michaelhar...@cox.net>
Subject Re: Bug in Lucene Sandbox SpellChecker class (fix included)
Date Sun, 05 Feb 2006 23:39:24 GMT
This fix has been included in the repository.
Thanks....


Michael Harhen wrote:
> While debugging a Lucene application using the Sandbox SpellChecker, I 
> have identified a problem with SpellChecker's suggestSimilar(...) method.
>
> Lines 175-177 are currently:
>            if (sugword.string==word) {
>                continue; // don't suggest a word for itself, that 
> would be silly
>            }
>
> I believe that "==" should be replaced by equals(), so the code should 
> read:
>            if (sugword.string.equals(word)) {
>                continue; // don't suggest a word for itself, that 
> would be silly
>            }
>
> I cannot think of any case where using "==" would give the expected 
> result. Also, making the change eliminated my bug!
>
> What is the procedure to get this fix incorporated in the Sandbox?
>
> Regards
> Michael H
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message