<< Back to previous view

[CLJ-793] print-doc triggers NPE in clojure.lang.Namespace.find Created: 13/May/11  Updated: 31/May/11  Resolved: 31/May/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.2
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Philipp Meier Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None
Environment:

windows xp / java 1.6.0_24



 Description   

In a swank repl I tried to invoke (print-doc ADefTypeInCurrentNamespace) and got the following exception:

No message.
[Thrown class java.lang.NullPointerException]

Restarts:
0: [QUIT] Quit to the SLIME top level

Backtrace:
0: java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
1: clojure.lang.Namespace.find(Namespace.java:188)
2: clojure.core$find_ns.invoke(core.clj:3180)
3: clojure.core$the_ns.invoke(core.clj:3208)
4: clojure.core$ns_name.invoke(core.clj:3214)
5: clojure.core$print_doc.invoke(core.clj:3831)
6: les$eval36576.invoke(NO_SOURCE_FILE:1)
7: clojure.lang.Compiler.eval(Compiler.java:5424)
8: clojure.lang.Compiler.eval(Compiler.java:5391)
9: clojure.core$eval.invoke(core.clj:2382)
10: swank.commands.basic$eval_region.invoke(basic.clj:47)
11: swank.commands.basic$eval_region.invoke(basic.clj:37)
12: swank.commands.basic$eval797$listener_eval__798.invoke(basic.clj:71)
13: clojure.lang.Var.invoke(Var.java:365)
14: les$eval36574.invoke(NO_SOURCE_FILE)
15: clojure.lang.Compiler.eval(Compiler.java:5424)
16: clojure.lang.Compiler.eval(Compiler.java:5391)
17: clojure.core$eval.invoke(core.clj:2382)
18: swank.core$eval_in_emacs_package.invoke(core.clj:90)
19: swank.core$eval_for_emacs.invoke(core.clj:237)
20: clojure.lang.Var.invoke(Var.java:373)
21: clojure.lang.AFn.applyToHelper(AFn.java:169)
22: clojure.lang.Var.applyTo(Var.java:482)
23: clojure.core$apply.invoke(core.clj:540)
24: swank.core$eval_from_control.invoke(core.clj:97)
25: swank.core$eval_loop.invoke(core.clj:102)
26: swank.core$spawn_repl_thread$fn_482$fn_483.invoke(core.clj:307)
27: clojure.lang.AFn.applyToHelper(AFn.java:159)
28: clojure.lang.AFn.applyTo(AFn.java:151)
29: clojure.core$apply.invoke(core.clj:540)
30: swank.core$spawn_repl_thread$fn__482.doInvoke(core.clj:304)
31: clojure.lang.RestFn.invoke(RestFn.java:398)
32: clojure.lang.AFn.run(AFn.java:24)
33: java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by Philipp Meier [ 13/May/11 3:18 AM ]

The following steps reproduce the error:

(deftype Foo [])
(print-doc Foo)

Comment by Stuart Sierra [ 31/May/11 9:15 AM ]

clojure.repl/print-doc is private in Clojure 1.3, and no longer throws NPE in the example case.

Generated at Tue Sep 02 19:56:21 CDT 2014 using JIRA 4.4#649-r158309.