-
Bug
-
Resolution: Fixed
-
P4
-
8, 9
-
b83
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142282 | emb-9 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | team |
JDK-8140985 | 8u91 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b01 |
JDK-8136555 | 8u72 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b01 |
JDK-8147354 | emb-8u91 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b01 |
test/script/basic/javaarrayconversion.js asserts that an array of java objects can't be convert to a primitive Java array using the line:
Java.to([new Java.type(sourceType)()], targetType + "[]"
expecting a TypeError. However the caught TypeError is actually "function type() { [native code] } is not a constructor function" because new is called on Java.type, not its result. So it should instead be:
Java.to([new (Java.type(sourceType))()], targetType + "[]");
After this change the test fails with "no TypeError encountered" what suggests a bug in Nashorn.
Java.to([new Java.type(sourceType)()], targetType + "[]"
expecting a TypeError. However the caught TypeError is actually "function type() { [native code] } is not a constructor function" because new is called on Java.type, not its result. So it should instead be:
Java.to([new (Java.type(sourceType))()], targetType + "[]");
After this change the test fails with "no TypeError encountered" what suggests a bug in Nashorn.
- backported by
-
JDK-8136555 javaarrayconversion.js test is flawed
- Resolved
-
JDK-8140985 javaarrayconversion.js test is flawed
- Resolved
-
JDK-8142282 javaarrayconversion.js test is flawed
- Resolved
-
JDK-8147354 javaarrayconversion.js test is flawed
- Resolved
- relates to
-
JDK-8072426 Can't compare Java enums to strings
- Resolved