Closed Skerberus closed 9 years ago
There were some problems with persisting nulls. So I changed default value for Atomic.Var from null to "". Solution for this is to supply your own default value as second parameter: DB.createAtomicVar("lastBlock",new byte[0]);
Or use 2.0 which has this problem solved and allows null.s
In mapdb 1.0.7 this works fine
private Var<byte[]> lastBlockVar; private byte[] lastBlockSignature;
this.lastBlockVar = database.getAtomicVar("lastBlock"); this.lastBlockSignature = lastBlockVar.get();
(here null is returned, which is OK)
In mapdb 1.0.8 an empty String is returned but should be null (starting from scratch). java.lang.ClassCastException: java.lang.String cannot be cast to [B at database.BlockMap.(BlockMap.java:46)
at database.DBSet.(DBSet.java:95)