Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Major
-
Resolution: Completed
-
Affects Version/s: Release 1.2, Release 1.3
-
Fix Version/s: Release 1.5
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
-
Approval:Ok
Description
Calling a keyword on a map returned from clojure.core/bean causes a null pointer exception if the keyword is not a key in the map:
user=> (:a (bean {}))
java.lang.NullPointerException (NO_SOURCE_FILE:0)
user=> (.printStackTrace *e)
Caused by: java.lang.NullPointerException
at clojure.core$bean$v__4765.invoke(core_proxy.clj:385)
at clojure.core$bean$fn__4786.invoke(core_proxy.clj:394)
at clojure.core.proxy$clojure.lang.APersistentMap$0.valAt(Unknown Source)
at clojure.lang.KeywordLookupSite.fault(KeywordLookupSite.java:33)
at user$eval1062.invoke(NO_SOURCE_FILE:7)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 9 more
The object returned by bean claims to be an APersistentMap FWIW:
user=> (class (bean {}))
clojure.core.proxy$clojure.lang.APersistentMap$0
Bean needs a full overhaul. In my ideal world it would be deprecated out of core into some other namespace.