takawitter / trie4j

PATRICIA, Double Array, LOUDS Trie implementations for Java
Apache License 2.0
174 stars 31 forks source link

`o.t.io.TrieWriter#writeSuccinctBitVector` don't have enough `if` conditions #43

Closed miurahr closed 1 year ago

miurahr commented 1 year ago

I found that there are not enough if conditions for o.t.io.TrieWriter#writeSuccinctBitVector method.

Argument SuccinctBitVector sbv is checked by instanceof

but it also can be

that become IOException.

I observed it when running TrieWriterTest with a Japanese wikipedia title data at 20230901.

miurahr commented 1 year ago

I can say similar for TrieReader. It does not have a capability to produce LongsRank0OnlySuccinctBitVector and LongsRank1OnlySuccinctBitVector.