Details
-
Type:
Defect
-
Status:
In Progress
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Pulled this from clojure assembla ticket #436 to clojure-contrib
See clojure-436
What (small set of) steps will reproduce the problem?
$ java -cp lib/clojure-1.2.0.jar:lib/clojure-contrib-1.2.0.jar clojure.main
Clojure 1.2.0
user=> (require 'clojure.contrib.json)
nil
user=> (clojure.contrib.json/read-json "")
java.lang.IllegalArgumentException: Value out of range for char: -1 (NO_SOURCE_FILE:0)
user=>
What is the expected output? What do you see instead?
Expected:
(if eof-error? (throw (EOFException. "JSON error (end-of-file)")) eof-value)
What version are you using?
1.2
Was this discussed on the group? If so, please provide a link to the discussion
[13:51] <na_ka_na> Hey guys I think there's a bug in clojure.contrib.json at line 116
[13:51] <na_ka_na> in clojure 1.2
[13:52] <na_ka_na> it has a (char i) and then checks for (= i -1) ... but (char -1) fails
[13:52] <na_ka_na> where can I report it ?
[13:53] <LauJensen> na_ka_na: assembla/support
Could this be a duplicate of http://dev.clojure.org/jira/browse/CONTRIB-91 ?