am 091ee762
: Merge "Fix a bug ending in a NPE in some rare cases."
* commit '091ee76285593d4c2a638d1927016e5bdfceccfd': Fix a bug ending in a NPE in some rare cases.
This commit is contained in:
commit
78e0af9ddd
1 changed files with 2 additions and 2 deletions
|
@ -217,7 +217,7 @@ public class FusionDictionary implements Iterable<Word> {
|
|||
int nodeIndex = findIndexOfChar(mRoot, word[charIndex]);
|
||||
while (CHARACTER_NOT_FOUND != nodeIndex) {
|
||||
currentGroup = currentNode.mData.get(nodeIndex);
|
||||
differentCharIndex = compareArrays(currentGroup.mChars, word, charIndex) ;
|
||||
differentCharIndex = compareArrays(currentGroup.mChars, word, charIndex);
|
||||
if (ARRAYS_ARE_EQUAL != differentCharIndex
|
||||
&& differentCharIndex < currentGroup.mChars.length) break;
|
||||
if (null == currentGroup.mChildren) break;
|
||||
|
@ -268,7 +268,7 @@ public class FusionDictionary implements Iterable<Word> {
|
|||
+ new String(word, 0, word.length));
|
||||
}
|
||||
final CharGroup newGroup = new CharGroup(word,
|
||||
currentGroup.mBigrams, frequency);
|
||||
currentGroup.mBigrams, frequency, currentGroup.mChildren);
|
||||
currentNode.mData.set(nodeIndex, newGroup);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue