Cannot cast jdk.nashorn.internal.objects.NativeArray to java.util.Collection
A. Sundararajan
sundararajan.athijegannathan at oracle.com
Wed Sep 17 13:47:57 UTC 2014
var arr = [233, 22];
var list = Java.to(arr, java.util.List);
print(list instanceof java.util.List);
There is auto-conversion b/w JavaScript arrays to Java arrays. I don't
recall auto conversion from script arrays to collections.
-Sundar
On Wednesday 17 September 2014 07:08 PM, Tal Liron wrote:
> I'm getting these errors with the recent hg update. In the past, I
> could send JavaScript arrays to JVM functions that accepted collections.
>
> Is this change intentional? What is the rationale for it?
More information about the nashorn-dev
mailing list