Make sure gridfs finders never go into infinite recursion

Protocol matching is hash-based, so we cannot guarantee that DBObject implementation will
always be picked before java.util.Map's.
This commit is contained in:
Michael S. Klishin 2012-06-04 14:15:12 +04:00
parent e033aa995b
commit a6544a1617

View file

@ -132,7 +132,8 @@
(find-one-as-map [^DBObject input]
(converter (find-one input)))
java.util.Map
;; using java.util.Map here results in (occasional) recursion
clojure.lang.IPersistentMap
(find [^java.util.Map input]
(find (to-db-object input)))
(find-one [^java.util.Map input]