v2.5.2
This commit is contained in:
parent
5ea4af7356
commit
f8239531da
3 changed files with 9 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
**[API docs](http://ptaoussanis.github.io/nippy/)** | **[CHANGELOG](https://github.com/ptaoussanis/nippy/blob/master/CHANGELOG.md)** | [contact & contributing](#contact--contributing) | [other Clojure libs](https://www.taoensso.com/clojure-libraries) | [Twitter](https://twitter.com/#!/ptaoussanis) | current [semantic](http://semver.org/) version:
|
**[API docs](http://ptaoussanis.github.io/nippy/)** | **[CHANGELOG](https://github.com/ptaoussanis/nippy/blob/master/CHANGELOG.md)** | [contact & contributing](#contact--contributing) | [other Clojure libs](https://www.taoensso.com/clojure-libraries) | [Twitter](https://twitter.com/#!/ptaoussanis) | current [semantic](http://semver.org/) version:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
[com.taoensso/nippy "2.5.1"] ; Stable
|
[com.taoensso/nippy "2.5.2"] ; Stable
|
||||||
```
|
```
|
||||||
|
|
||||||
# Nippy, a Clojure serialization library
|
# Nippy, a Clojure serialization library
|
||||||
|
|
@ -32,7 +32,7 @@ Nippy is an attempt to provide a reliable, high-performance **drop-in alternativ
|
||||||
Add the necessary dependency to your [Leiningen](http://leiningen.org/) `project.clj` and `require` the library in your ns:
|
Add the necessary dependency to your [Leiningen](http://leiningen.org/) `project.clj` and `require` the library in your ns:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
[com.taoensso/nippy "2.5.1"] ; project.clj
|
[com.taoensso/nippy "2.5.2"] ; project.clj
|
||||||
(ns my-app (:require [taoensso.nippy :as nippy])) ; ns
|
(ns my-app (:require [taoensso.nippy :as nippy])) ; ns
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(defproject com.taoensso/nippy "2.5.1"
|
(defproject com.taoensso/nippy "2.5.2"
|
||||||
:description "Clojure serialization library"
|
:description "Clojure serialization library"
|
||||||
:url "https://github.com/ptaoussanis/nippy"
|
:url "https://github.com/ptaoussanis/nippy"
|
||||||
:license {:name "Eclipse Public License"
|
:license {:name "Eclipse Public License"
|
||||||
|
|
|
||||||
|
|
@ -294,11 +294,13 @@
|
||||||
:type :reader})))
|
:type :reader})))
|
||||||
|
|
||||||
id-serializable
|
id-serializable
|
||||||
(let [class-name (read-utf8 s)
|
(let [class-name (read-utf8 s)]
|
||||||
object (.readObject (ObjectInputStream. s))]
|
(try (let [;; .readObject _before_ Class/forName: it'll always read
|
||||||
(try (let [class ^Class (Class/forName class-name)]
|
;; all data before throwing
|
||||||
|
object (.readObject (ObjectInputStream. s))
|
||||||
|
class ^Class (Class/forName class-name)]
|
||||||
(cast class object))
|
(cast class object))
|
||||||
(catch Exception _ {:nippy/unthawable [class-name object]
|
(catch Exception _ {:nippy/unthawable class-name
|
||||||
:type :serializable})))
|
:type :serializable})))
|
||||||
|
|
||||||
id-bytes (read-bytes s)
|
id-bytes (read-bytes s)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue