RFR: 8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument

Attila Szegedi szegedia at gmail.com
Wed Jan 25 16:21:15 UTC 2017

Oh, great. I was just starting at this for a bit (after I saw you updated the JIRA), and was definitely starting to suspect the filterInternalObjects call in NashornBeansLinker. It still worries me that filtering would add a script object mirror wrapper – the method handle’s parameter is typed as List, isn’t it? DefaultInternalObjectFilter should only operate on parameters declared as Object.


> On 25 Jan 2017, at 17:05, Hannes Wallnöfer <hannes.wallnoefer at oracle.com> wrote:
> Please review:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8172006
> Webrev: http://cr.openjdk.java.net/~hannesw/8172006/webrev.00/
> The final invocation of linkerServices.filterInternalObjects was redundant, and in fact caused the argument to be converted to ScripObjectMirror when the actual target type was java.util.List. As far as I can tell, linkerServices.filterInternalObjects is called elsewhere for all types of invocations. Existing tests pass, and I added a few more.
> Thanks,
> Hannes

More information about the nashorn-dev mailing list