Browse files

Priority-map: One more improvement to equals method

  • Loading branch information...
1 parent 7bad658 commit af2b419d3b6a77db735eff98eb48173376b8226c @Engelberg Engelberg committed May 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj
View
2 modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj
@@ -211,7 +211,7 @@ to Clojure's assortment of built-in maps (hash-map and sorted-map).
; their key-value pairs are the same.
(equiv [this o] (.equiv item->priority o))
(hashCode [this] (.hashCode item->priority))
- (equals [this o] (.equals item->priority o))
+ (equals [this o] (or (identical? this o) (.equals item->priority o)))
;containsKey implements (contains? pm k) behavior
(containsKey [this item] (contains? item->priority item))

0 comments on commit af2b419

Please sign in to comment.