Skip to content

Commit

Permalink
Fixes NPE in hashcode with empty keys (Issue 52)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Sutton committed Jun 22, 2017
1 parent dee42b9 commit 2473a2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/potemkin/collections.clj
Expand Up @@ -119,7 +119,8 @@
(hashCode [this]
(reduce
(fn [acc [k v]]
(unchecked-add acc (bit-xor (.hashCode k) (.hashCode v))))
(unchecked-add acc (bit-xor (clojure.lang.Util/hash k)
(clojure.lang.Util/hash v))))
0
(seq this)))

Expand Down

0 comments on commit 2473a2b

Please sign in to comment.