After a bit more experimenting, I found the following workaround to be
suitable for the time-being in case anyone else is having similar
troubles.
(defn arraylist_remove [#^ArrayList list index]
(.remove list (int index)))
--~--~-~--~~~---~--~~
You received this
CuppoJava a écrit :
> That workaround works nicely for now. I think though that this problem
> can potentially be the source of many hard-to-find bugs though. ie..
> like in my second example, the vector of ArrayLists.
>
You can ask to be warned:
user=> (set! *warn-on-reflection* true)
true
use
Thanks Chouser,
That workaround works nicely for now. I think though that this problem
can potentially be the source of many hard-to-find bugs though. ie..
like in my second example, the vector of ArrayLists.
--~--~-~--~~~---~--~~
You received this message because y
On Fri, Jan 9, 2009 at 9:49 PM, CuppoJava wrote:
>
> After more experimenting, it seems like a potentially difficult bug to
> resolve. Clojure attempts to treat all numbers as objects, but in this
> case, the choice of whether a number is an object or a primitive
> affects which method is called.
After more experimenting, it seems like a potentially difficult bug to
resolve. Clojure attempts to treat all numbers as objects, but in this
case, the choice of whether a number is an object or a primitive
affects which method is called.
(let [temp [(java.util.ArrayList. ["foo"])]]
(.remove (f