Skip to content
Browse files

CLJ-857: add test showing NPE when reflection can't resolve method, w…

…ith nil literal

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information...
1 parent abfa803 commit 57c46ac5869bbb01706e0d3aa18af6417963b7fd @bpsm bpsm committed with stuarthalloway Oct 14, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/clojure/test_clojure/rt.clj
View
4 test/clojure/test_clojure/rt.clj
@@ -38,6 +38,10 @@
(should-print-err-message
#"Reflection warning, .*:\d+ - call to zap can't be resolved with arguments of type \(long\)\.\r?\n"
(defn foo [x] (.zap x 1))))
+ (testing "reflection cannot resolve instance method, with nil literal"
+ (should-print-err-message
+ #"Reflection warning, .*:\d+ - call to zap can't be resolved with arguments of type \(nil\)\.\r?\n"
+ (defn foo [x] (.zap x nil))))
(testing "reflection cannot resolve static method"
(should-print-err-message
#"Reflection warning, .*:\d+ - call to valueOf can't be resolved with arguments of type \(java.util.regex.Pattern\)\.\r?\n"

0 comments on commit 57c46ac

Please sign in to comment.
Something went wrong with that request. Please try again.