[ 
https://issues.apache.org/jira/browse/NETBEANS-193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16275446#comment-16275446
 ] 

Jaroslav Tulach commented on NETBEANS-193:
------------------------------------------

Fix that converts int[] Java signature to [I: 
https://github.com/JaroslavTulach/incubator-netbeans-html4j/commit/ba45f10dccac4e5caad487520ac55126ad7205a2
 - calling the method however still fails.

> Primitive arrays aren't properly converted to JNI signatures
> ------------------------------------------------------------
>
>                 Key: NETBEANS-193
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-193
>             Project: NetBeans
>          Issue Type: Bug
>          Components: platform - HTML4J
>    Affects Versions: 8.2
>            Reporter: Jaroslav Tulach
>            Assignee: Jaroslav Tulach
>            Priority: Minor
>
> 2017-11-29 12:49 GMT+01:00 Wooguil Pak:
>     Hello, Jaroslav Tulach,
>     I'm currently testing DEW and it seems that it does not support
>     parameters like integer array.
>     When I try
>       @JavaScriptBody(args = { "id", "r" },
>         javacall = true, body =
>         "var array = new Array();\n" +
>         "array[0]=1; array[1]=2;\n" +
>         "r...@dew.demo.lowlevel.Java2JsAndBack::test([I)(array);\n"
>       )
>       public static native void test(String id, Java2JsAndBack r);
>     compiler complaints
>     Callback to dew.demo.lowlevel.Java2JsAndBack.test with wrong
>     parameters: ([I). Only known parameters are ([L)
>     (Ljava/lang/String;Ldew/demo/lowlevel/Java2JsAndBack;)
>     If it is true, is there no way to pass integer array to Java as a 
> parameter?
> The report is correct. There is an error: the {{int[]}} shall be {{[I}} and 
> not {{[L}}. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to