Completed
Details
Assignee
Stuart HallowayStuart HallowayReporter
Stuart HallowayStuart HallowayApproval
OkPatch
Code and TestPriority
Major
Details
Details
Assignee
Stuart Halloway
Stuart HallowayReporter
Stuart Halloway
Stuart HallowayApproval
Ok
Patch
Code and Test
Priority

Created December 10, 2011 at 11:27 PM
Updated March 1, 2013 at 6:47 PM
Resolved March 1, 2013 at 6:47 PM
Per http://docs.oracle.com/javase/6/docs/api/index.html?java/util/Collections.html, Collection.toArray(T []) implements must allocate an array of type T[], not Object[]. This will cause type-casty code to break. Not often a problem in Clojure, but e.g. it makes Clojure defrecords unprintable from the JRuby console.
There is also a chance to DRY up some common code, as the six places that have this problem should all call an RT helper.
This also fixes toArray(T[]) for PersistentQueue when the passed array has the same length as the queue.