data.avl

AVL tree not serializable

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

You claim it's a drop-in replacement for PersistentTreeMap, but check this snippet, where oos is an ObjectOuputStream.

user=> (.writeObject oos (avl/sorted-map 1 2 3 4 5 6))
NotSerializableException clojure.data.avl.AVLNode java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1183)
user=> (.writeObject oos (sorted-map 1 2 3 4 5 6))
nil

Since Serializable is just an interface without any methods, this is probably a one-line change.

Activity

Hide
Michał Marczyk added a comment -
Show
Michał Marczyk added a comment - Oops, should be fixed on master. Thanks! https://github.com/clojure/data.avl/commit/4c1f61eb16d395e9e689128da55cbc6fb1bcac7b

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: