[CLJ-430] clojure.java.io URL Coercion throws java.lang.ClassCastException Created: 02/Sep/10 Updated: 11/Oct/10 Resolved: 11/Oct/10 |
|
| Status: | Closed |
| Project: | Clojure |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Release 1.3 |
| Type: | Defect | ||
| Reporter: | Anonymous | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Approval: | Ok |
| Description |
|
I noticed a bug in the clojure.java.io namespace at Line 57 in extend-protocol Coercions URL URL
(as-url [u] u)
(as-file [u]
(if (= "file" (.getProtocol u))
(as-file (.getPath u))
-- (throw (IllegalArgumentException. "Not a file: " u))))
++ (throw (IllegalArgumentException. (str "Not a file: " u)))))
</code></pre>
Right now it throws the error:
<pre><code>
Caused by: java.lang.ClassCastException: java.net.URL cannot be cast to java.lang.Throwable
at clojure.java.io $fn__7354.invoke(io.clj:56)
at clojure.java.io $fn__7328$G__7323__7333.invoke(io.clj:34)
Clojure version: 1.2 |
| Comments |
| Comment by Assembla Importer [ 11/Oct/10 2:25 PM ] |
|
Converted from http://www.assembla.com/spaces/clojure/tickets/430 |
| Comment by Assembla Importer [ 11/Oct/10 2:25 PM ] |
|
stu said: [file:cK6UTSZw4r345CeJe5cbLA] |
| Comment by Assembla Importer [ 11/Oct/10 2:25 PM ] |
|
stu said: Updating tickets (#139, #278, #285, #368, #443, #430) |
| Comment by Assembla Importer [ 11/Oct/10 2:25 PM ] |
|
stu said: Updating tickets (#139, #278, #285, #368, #443, #430) |