Hello folks, I have a Java method:
public void foo(List<Long> list) {
System.out.println("elem0 is " + list.get(0));
}
Which I call from JS with a JS array:
obj.foo([123]);
This results in a ClassCastException as Nashorn converts the JS Array
into a java.util.List instance which contains a java.lang.Integer
element (not java.lang.Long)
Is there any way to force Nashorn to convert the array elements as Longs not Integers?
Thanks.
