Loading java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java +2 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,8 @@ public class Ver3DictDecoder extends DictDecoder { addressPointer += PtNodeReader.readBigramAddresses(mDictBuffer, bigrams, addressPointer); if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) { MakedictLog.d("too many bigrams in a PtNode."); throw new RuntimeException("Too many bigrams in a PtNode (" + bigrams.size() + " but max is " + FormatSpec.MAX_BIGRAMS_IN_A_PTNODE + ")"); } } else { bigrams = null; Loading java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java +2 −1 Original line number Diff line number Diff line Loading @@ -224,7 +224,8 @@ public class Ver4DictDecoder extends DictDecoder { if (0 == (bigramFlags & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_HAS_NEXT)) break; } if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) { MakedictLog.d("too many bigrams in a node."); throw new RuntimeException("Too many bigrams in a PtNode (" + bigrams.size() + " but max is " + FormatSpec.MAX_BIGRAMS_IN_A_PTNODE + ")"); } } else { bigrams = null; Loading tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,9 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase { } sStarBigrams.put(0, new ArrayList<Integer>()); for (int i = 1; i < sWords.size(); ++i) { // MAX - 1 because we added one above already final int maxBigrams = Math.min(sWords.size(), FormatSpec.MAX_BIGRAMS_IN_A_PTNODE - 1); for (int i = 1; i < maxBigrams; ++i) { sStarBigrams.get(0).add(i); } Loading Loading
java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java +2 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,8 @@ public class Ver3DictDecoder extends DictDecoder { addressPointer += PtNodeReader.readBigramAddresses(mDictBuffer, bigrams, addressPointer); if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) { MakedictLog.d("too many bigrams in a PtNode."); throw new RuntimeException("Too many bigrams in a PtNode (" + bigrams.size() + " but max is " + FormatSpec.MAX_BIGRAMS_IN_A_PTNODE + ")"); } } else { bigrams = null; Loading
java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java +2 −1 Original line number Diff line number Diff line Loading @@ -224,7 +224,8 @@ public class Ver4DictDecoder extends DictDecoder { if (0 == (bigramFlags & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_HAS_NEXT)) break; } if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) { MakedictLog.d("too many bigrams in a node."); throw new RuntimeException("Too many bigrams in a PtNode (" + bigrams.size() + " but max is " + FormatSpec.MAX_BIGRAMS_IN_A_PTNODE + ")"); } } else { bigrams = null; Loading
tests/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderEncoderTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,9 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase { } sStarBigrams.put(0, new ArrayList<Integer>()); for (int i = 1; i < sWords.size(); ++i) { // MAX - 1 because we added one above already final int maxBigrams = Math.min(sWords.size(), FormatSpec.MAX_BIGRAMS_IN_A_PTNODE - 1); for (int i = 1; i < maxBigrams; ++i) { sStarBigrams.get(0).add(i); } Loading