Remove a useless test (B7)

consideredWord is provably never null.

Change-Id: Ifaa0d2471c46f14967e70ad004d2b82f841a4566
This commit is contained in:
Jean Chalard 2012-03-09 14:55:46 +09:00
parent cf8bc92ba0
commit 90bd4efd10

View file

@ -98,8 +98,7 @@ public class AutoCorrection {
private static boolean hasAutoCorrectionForBinaryDictionary(WordComposer wordComposer,
ArrayList<CharSequence> suggestions, int[] sortedScores,
CharSequence consideredWord, double autoCorrectionThreshold) {
if (wordComposer.size() > 1
&& consideredWord != null && suggestions.size() > 0 && sortedScores.length > 0) {
if (wordComposer.size() > 1 && suggestions.size() > 0 && sortedScores.length > 0) {
final CharSequence autoCorrectionSuggestion = suggestions.get(0);
final int autoCorrectionSuggestionScore = sortedScores[0];
// TODO: when the normalized score of the first suggestion is nearly equals to