jdk.nashorn.api.scripting.ScriptUtils.wrap
Sundararajan Athijegannathan
sundararajan.athijegannathan at oracle.com
Mon Nov 9 10:16:12 UTC 2015
The ScriptUtils methods are supposed to be called only from *scripts* -
which the javadoc comments makes it very clear. Why do you call it from
Java? When calling from script, the particular static type of method
parameters should not make any difference.
Besides, when crossing Javascript to java boundary, all script objects
are mirrored (wrapped) automatically now. There should be no need for
Java side to explicitly call wrap/unwrap at all. Will you please given
an example of your use-case?
Also, what other API instability concerns you have? Will you please be
more explicit on those?
Thanks,
-Sundar
On 11/9/2015 3:27 PM, Kockert, Timo wrote:
> Hello everyone,
>
> on October 7th, Richard Evans posted to this mailing list (with the same subject as me):
>
> "Sometime after jdk1.8u32 this method changed to take an internal jdk.nashorn.internal.runtime.ScriptObject argument. This means that code compiled with 1.8u20 will not work with later releases, and vice versa.
>
> Was this change intentional? Is this API now fixed for all future jdk1.8 and 1.9 releases?“
>
> I would very much like to know the same thing. Unfortunately, he didn’t get an answer. Could anyone please provide some insights?
>
> We’ve been using Nashorn since early 2015 now and there has been more that one occasion, when a newer JDK behaved differently (in respect to Nashorn) than an older JDK (up to the point of the aforementioned compile error). I guess my real question is, how stable is Nashorn’s API?
>
> Thanks
> Timo
More information about the nashorn-dev
mailing list