Looks like a bug to me. Fixed it locally with the change below, after
the Java implementations where atVal(x) delegates to atVal(x,null).

---
 src/clj/clojure/core_proxy.clj |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/clj/clojure/core_proxy.clj b/src/clj/clojure/
core_proxy.clj
index dc3514d..1a1b1a7 100644
--- a/src/clj/clojure/core_proxy.clj
+++ b/src/clj/clojure/core_proxy.clj
@@ -391,7 +391,7 @@
            []
       (containsKey [k] (contains? pmap k))
       (entryAt [k] (when (contains? pmap k) (new
clojure.lang.MapEntry k (v k))))
-      (valAt ([k] (v k))
+      (valAt ([k] (. this valAt k nil))
             ([k default] (if (contains? pmap k) (v k) default)))
       (cons [m] (conj (snapshot) m))
       (count [] (count pmap))
--


On Jul 28, 5:04 am, gfrlog <fredericksg...@gmail.com> wrote:
> Hey folks,
>
> It was suggested to me in IRC to check here before filing a bug
> report. I've noticed that the mappish object returned by clojure.core/
> bean will throw an NPE if you try to access a missing key. Since
> normal maps don't do this, and I can't think of any reason you would
> want that behavior, it seems to me a bug. Any thoughts?
>
> Gary

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to