Print warning when replacing a custom type reader
This commit is contained in:
parent
13cdf06a60
commit
7925982939
1 changed files with 3 additions and 0 deletions
|
|
@ -685,6 +685,9 @@
|
|||
(->MyType (.readUTF data-input)))"
|
||||
[custom-type-id [in] & body]
|
||||
(assert-custom-type-id custom-type-id)
|
||||
(when (contains? @custom-readers (coerce-custom-type-id custom-type-id))
|
||||
(println (format "Warning: resetting Nippy thaw for custom type with id: %s"
|
||||
custom-type-id)))
|
||||
`(swap! custom-readers assoc
|
||||
~(coerce-custom-type-id custom-type-id)
|
||||
(fn [~(with-meta in {:tag 'java.io.DataInput})]
|
||||
|
|
|
|||
Loading…
Reference in a new issue