JDK-8212014 : JavaScriptBridgeTest::testBridgeExplicitOverloading test fails when run with newer JDK 8u
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u181
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-10-10
  • Updated: 2019-03-12
  • Resolved: 2018-11-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8u211Fixed openjdk8u212Fixed
Related Reports
Relates :  
Description
The JavaScriptBridgeTest::testBridgeExplicitOverloading test in FX 8u-dev is failing when I run with a recent JDK 8u release such as JDK 8u181.

$ gradle --info :web:test --tests javafx.scene.web.JavaScriptBridgeTest
javafx.scene.web.JavaScriptBridgeTest > testBridgeExplicitOverloading FAILED
    java.lang.AssertionError: expected same:<[Ljava.lang.Integer;@7945dc0e> was not:<undefined>
        at org.junit.Assert.fail(Assert.java:91)
        at org.junit.Assert.failNotSame(Assert.java:639)
        at org.junit.Assert.assertSame(Assert.java:578)
        at org.junit.Assert.assertSame(Assert.java:591)
        at javafx.scene.web.JavaScriptBridgeTest.lambda$testBridgeExplicitOverloading$12(JavaScriptBridgeTest.java:582)

Comments
Starting work on jdk8u backport. Pardon the noise, the jdk8u backport has already been done by mbilla.
22-02-2019

Changeset: 697a138c3b6b Author: mbilla Date: 2018-11-05 13:05 +0530 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/697a138c3b6b
05-11-2018

lgtm
05-11-2018

+1
02-11-2018

webrev: http://cr.openjdk.java.net/~mbilla/8212014/webrev.00/
02-11-2018

[~kcr] sorry..it was my mistake..
02-11-2018

No, the above line of code is not in 8u-dev. jfx-dev: 582 Object r = web.executeScript("alist['toArray(Object[])'](iarr)"); 8u-dev: 581 Object r = web.executeScript("alist.toArray(iarr)");
02-11-2018

I compared the file javafx.scene.web.JavaScriptBridgeTest between 8u-dev and jfx-dev and the below fix is already present in 8u-dev as well: Object r = web.executeScript("alist['toArray(Object[])'](iarr)");
02-11-2018

See JDK-8146641 for a description of why this is so. We need to backport JDK-8146641 to JDK 8u, at which point the JavaScriptBridgeTest.java files will be identical between 8u-dev and jfx-dev (except for file paths).
10-10-2018