#259: jss:jarray-to-list fails --------------------------------------------+------------------------------- Reporter: https://openid.fau.de/eg74yneg | Owner: mevenson Type: defect | Status: accepted Priority: major | Milestone: 1.1.0 Component: abcl-contrib | Version: 1.1.0-dev Keywords: | --------------------------------------------+------------------------------- Changes (by mevenson):
* status: new => accepted * version: => 1.1.0-dev * milestone: => 1.1.0
Comment:
Maybe something screwed up in our type mapping for JAVA-OBJECT. (java :jnew-array (jclass "int") 40) creates a JAVA-OBJECT whose intendedType is int[]. The code in java.isApplicableMethod() signals that java.lang.Arrays.asList(Object[]) is not an applicable method although the following code outputs "true" indicating that it should be matched, as it is successfully applicable.
{{{ int i[] = {new Integer(40)}; Object[] type = {1}; Class clazz = type.getClass(); System.out.println(clazz.getComponentType().isInstance(i)); }}}
I tried fixing Java.isApplicableMethod() but it didn't work out in the time I had.
I have a simpler fix for JSS:JARRAY-TO-LIST which doesn't involve resolving this problem which I will commit shortly, but am noting the possibly deeper problem for followup.