aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-10-20 14:48:56 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-10-21 19:28:37 +0900
commit5f00fe09e9a611b647592188316e5999465df4d3 (patch)
tree954a429256171897c7b9ed56a732e386eec76b2b /tests/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java
parentfa1e65cb3a5dcce6299a6dd067cee95720107307 (diff)
downloadlatinime-5f00fe09e9a611b647592188316e5999465df4d3.tar.gz
latinime-5f00fe09e9a611b647592188316e5999465df4d3.tar.xz
latinime-5f00fe09e9a611b647592188316e5999465df4d3.zip
Fix some compiler warnings
This CL fixes the following compiler warnings. - Indirect access to static member - Access to a non-accessible member of an enclosing type - Parameter assignment - Method can be static - Local variable declaration hides another field or variable - Value of local variable is not used - Unused import - Unused private member - Unnecessary 'else' statement - Unnecessary declaration of throw exception - Redundant type arguments - Missing '@Override' annotation - Unused '@SuppressWarning' annotations Bug: 18003991 Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
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) {