Factual / clj-leveldb

Clojure bindings for LevelDB
74 stars 20 forks source link

NullPointerException thrown by clj-leveldb/iterator #1

Open domkm opened 10 years ago

domkm commented 10 years ago
(def db (clj-leveldb/create-db "/tmp/leveldb" {:key-decoder byte-streams/to-string :val-decoder byte-streams/to-string}))

(clj-leveldb/iterator db)
;=> java.lang.NullPointerException

(clj-leveldb/put db "foo" "bar")

(clj-leveldb/iterator db)
;=> (["foo" "bar"])

(clj-leveldb/iterator db "z")
;=> java.lang.NullPointerException

I would expect clj-leveldb/iterator to return an empty closeable seq instead of throwing a NullPointerException.