[CLJ-286] *out* being used as java.io.PrintWriter Created: 29/Mar/10 Updated: 14/Oct/10 Resolved: 14/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 |
|
There seem to be several places in clojure/contrib where out is being used as a java.io.PrintWriter, despite being documented as of type java.io.Writer
This causes very confusing errors, when out isn't actually a PrintWriter, for example in a swank repl where it is a StringWriter. I've created a patch for the reflection warnings, but can't submit it here because of political issues. |
| Comments |
| Comment by Assembla Importer [ 14/Oct/10 2:27 PM ] |
|
Converted from http://www.assembla.com/spaces/clojure/tickets/286 |
| Comment by Assembla Importer [ 14/Oct/10 2:27 PM ] |
|
rnewman said: See and the associated discussion on the group. Clojure's out is actually intended to be a PrintWriter; it's a documentation issue. |
| Comment by Assembla Importer [ 14/Oct/10 2:27 PM ] |
|
djpowell said: [file:cEQbXEuiar367beJe5d-aX]: Fix for related printwriter issue |
| Comment by Assembla Importer [ 14/Oct/10 2:27 PM ] |
|
djpowell said: There was also some discussion that out should not be assumed to be a PrintWriter: http://groups.google.co.uk/group/clojure-dev/browse_thread/thread/99aa2b3263a0b374?hl=en I've attached a patch for the related issue of err being assumed to be a PrintWriter. I think this is the only place in clojure itself, although there are other places in contrib. |
| Comment by Assembla Importer [ 14/Oct/10 2:27 PM ] |
|
stu said: [file:b4nAPA16Gr34ZzeJe5cbLA] |
| Comment by Assembla Importer [ 14/Oct/10 2:27 PM ] |
|
stu said: Second patch subsumes first, plus two additions
I don't like binding out to err, but the entire print plumbing drives you in this direction. |
| Comment by Assembla Importer [ 14/Oct/10 2:27 PM ] |
|
stu said: Updating tickets (#182, #286) |