vigna / Sux4J

Sux4J is an effort to bring succinct data structures to Java.
GNU Lesser General Public License v2.1
154 stars 22 forks source link

ZFastTrie - null pointer on add operation #5

Closed cornelcreanga closed 5 years ago

cornelcreanga commented 5 years ago

Error message:

Exception in thread "main" java.lang.NullPointerException at it.unimi.dsi.sux4j.util.ZFastTrie.addBefore(ZFastTrie.java:778) at it.unimi.dsi.sux4j.util.ZFastTrie.add(ZFastTrie.java:1153) at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:352) at com.creanga.sux4jissues.ZFastTrieNullPointer.main(ZFastTrieNullPointer.java:17)

Sux4J version: 4.3.0

To reproduce the issue run the following class:

https://github.com/cornelcreanga/Sux4J-issues/blob/master/src/main/java/com/creanga/sux4jissues/ZFastTrieNullPointer.java

vigna commented 5 years ago

You cannot use a non-prefix-free transformation. It's written clearly in the documentation.