hankcs / AhoCorasickDoubleArrayTrie

An extremely fast implementation of Aho Corasick algorithm based on Double Array Trie.
http://www.hankcs.com/program/algorithm/aho-corasick-double-array-trie.html
950 stars 290 forks source link

parseText throw ArrayIndexOutOfBoundsException when build with an empty map #50

Closed XhstormR closed 3 years ago

XhstormR commented 3 years ago
val acdat = AhoCorasickDoubleArrayTrie<String>()
acdat.build(emptyMap())

println(acdat.parseText("uhers")) // java.lang.ArrayIndexOutOfBoundsException

image

XhstormR commented 3 years ago

The previous issue https://github.com/hankcs/AhoCorasickDoubleArrayTrie/issues/45 has not been fixed。

hankcs commented 3 years ago

Thanks. Now fixed.