Skip to content

Commit

Permalink
v2.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Dec 7, 2013
1 parent 5ea4af7 commit f823953
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:

```clojure
[com.taoensso/nippy "2.5.1"] ; Stable
[com.taoensso/nippy "2.5.2"] ; Stable
```

# Nippy, a Clojure serialization library
Expand Down Expand Up @@ -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:

```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
```

Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject com.taoensso/nippy "2.5.1"
(defproject com.taoensso/nippy "2.5.2"
:description "Clojure serialization library"
:url "https://github.com/ptaoussanis/nippy"
:license {:name "Eclipse Public License"
Expand Down
10 changes: 6 additions & 4 deletions src/taoensso/nippy.clj
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,13 @@
:type :reader})))

id-serializable
(let [class-name (read-utf8 s)
object (.readObject (ObjectInputStream. s))]
(try (let [class ^Class (Class/forName class-name)]
(let [class-name (read-utf8 s)]
(try (let [;; .readObject _before_ Class/forName: it'll always read
;; all data before throwing
object (.readObject (ObjectInputStream. s))
class ^Class (Class/forName class-name)]
(cast class object))
(catch Exception _ {:nippy/unthawable [class-name object]
(catch Exception _ {:nippy/unthawable class-name
:type :serializable})))

id-bytes (read-bytes s)
Expand Down

0 comments on commit f823953

Please sign in to comment.