On 3/23/10 7:16 PM, Alessio Stalla wrote: […]
Comments and advice solicited.
I believe the isAssignableFrom check was just a plain mistake. The "intended type" can be as generic as possible (i.e. it can be java.lang.Object for any JavaObject) so it does not make much sense to check against it. Imho it's correct to only do the isInstance() call. Arrays of primitive types and arrays of corresponding wrapper types are not interchangeable in Java so there should be no concern about them in this context.
Note also that the intended type iirc is only used by jcall in its abbreviated form - (jcall "methodName" instance args) - to access methods using a supertype of the actual class of the object when possible. This means that the intended type can be set quite loosely; it's basically just a hint for jcall.
Thanks for the analysis, as it makes me quite a bit more comfortable with the change: I retract the "I'm unhappy with this change" comment, and consider this problem fixed.