[8u60] Request for Approval: 8072426: Can't compare Java objects to strings or numbers

Seán Coffey sean.coffey at oracle.com
Wed Mar 11 13:12:19 UTC 2015


Approved.

regards,
Sean.

On 11/03/15 12:42, Attila Szegedi wrote:
> Please approve.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8072426
> jdk9 webrev: http://cr.openjdk.java.net/~attila/8072426/webrev.00
> jdk9 review thread: http://mail.openjdk.java.net/pipermail/nashorn-dev/2015-February/004191.html
>
> In order to backport this to 8u-dev, I had to make some changes. Namely, since we introduced a default method into the JSObject interface, we could not compile this under jdk8u-dev, as for JDK 8 Nashorn is compiled with "-source 7" as the part of the build process is running Nasgen, which is done with the boot JDK, which is a JDK 7 for 8u…
>
> For this reason, the 8u backport doesn't add a new getDefaultValue() method to the JSObject interface, as that – without the default methods' availability with "-source 7" – wouldn't be a binary compatible class change. Instead, AbstractJSObject gains a getDefaultValue(hint) method with the same behavior as well as a static helper getDefaultValue(jsobj, hint) that delegates to AbstractJSObject.getDefaultValue() for AbstractJSObject, and runs the generic algorithm for any other JSObject. (As a separate task, I will soon be forward-porting this static helper into JDK 9 codebase so it stays compatible with 8; JDK-8074661 is filed for that.)
>
> jdk8 webrev: http://cr.openjdk.java.net/~attila/8072426/webrev.8u
> jdk8 review thread: http://mail.openjdk.java.net/pipermail/nashorn-dev/2015-March/004273.html
>
> Thanks,
>    Attila.



More information about the jdk8u-dev mailing list