Re: Supporting [[hasProperty]] on JavaBeans

2017-01-26 Thread Attila Szegedi
BeansLinker has a bunch of static methods like getReadableInstancePropertyNames etc. that could be used to implement special cases in ScriptRuntime.IN. A logic modelled after how NativeObject.bindProperties works should do (after all, “in” on a bean should work equivalently to how it works on

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

2017-01-26 Thread Jim Laskey (Oracle)
+1 > On Jan 25, 2017, at 12:45 PM, Hannes Wallnöfer > wrote: > > >> Am 25.01.2017 um 17:39 schrieb Attila Szegedi : >> >> Well, filterInternalObjects itself doesn’t change the method handle type. I >> guess what happens is that the delegate

Supporting [[hasProperty]] on JavaBeans

2017-01-26 Thread Hannes Wallnöfer
I noticed today that we don’t support the „in“ operator on JavaBeans. ScriptRuntime.IN(Object, Object) returns false if the second argument is a generic object (not a ScriptObject or JSObject). I was wondering if this is an oversight or intentional. If it is the former, how would we implement

Re: Mustache.js on Nashorn

2017-01-26 Thread Hannes Wallnöfer
Hi Iñigo, I’ve looked at your project. The array of todo items is converted correctly, and access to the items in the array from JS works as expected. I guess you should have a look at what’s going on inside mustache.js. Hannes > Am 23.01.2017 um 23:24 schrieb Iñigo Telleria