aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
index 9c3b37387..5e90387f7 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
@@ -206,11 +206,7 @@ public final class BinaryDictIOUtils {
if (same) {
// found the PtNode matches the word.
if (wordPos + currentInfo.mCharacters.length == wordLen) {
- if (!currentInfo.isTerminal()) {
- return FormatSpec.NOT_VALID_WORD;
- } else {
- return ptNodePos;
- }
+ return currentInfo.isTerminal() ? ptNodePos : FormatSpec.NOT_VALID_WORD;
}
wordPos += currentInfo.mCharacters.length;
if (currentInfo.mChildrenAddress == FormatSpec.NO_CHILDREN_ADDRESS) {