Bug report: JavaScript arrays are not coerced into Java arrays when calling Java functions that expect arrays
Jim Laskey (Oracle)
james.laskey at oracle.com
Wed Oct 9 01:15:59 PDT 2013
After consideration and from my own experiences, I'm going to add as a feature request. However, code freeze is next week, so it's extremely likely this will not show up until first non-security update.
JDK-8026113
Cheers,
-- Jim
On 2013-10-08, at 9:02 PM, Tal Liron <tal.liron at threecrickets.com> wrote:
> Until he follows up, here's how I *think* it works from looking at the code:
>
> Argument conversion is handled by GuardingTypeConverterFactory instances. In Nashorn, these are NashornLinker and NashornPrimitiveLinker.
>
> Custom converters are loaded with a ServiceLoader, and thus can be defined in META-INF/services/jdk.internal.dynalink.linker.GuardingDynamicLinker. If any of those instances also implement GuardingTypeConverterFactory, then they are added to the converter chain.
>
> But I have to say that beyond that the code is hard to follow... conversion is actually handled with dynamic links so it's somewhat "meta" programming at that stage. I'm also unclear as to which converter is selected if multiple are available...
>
> Any tips towards helping me find a solution to my issue would be appreciated. Indeed, a simple skeleton for a custom linker would be great!
>
> On 10/08/2013 09:04 PM, Jim Laskey (Oracle) wrote:
>> You could always create your own Dynalink linker plug in to do the wrappers you need. Sundar will follow up.
>>
>
More information about the nashorn-dev
mailing list