-
Bug
-
Resolution: Fixed
-
P3
-
8u20
-
b36
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085746 | emb-9 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
JDK-8064254 | 8u45 | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8061317 | 8u40 | Hannes Wallnoefer | P3 | Resolved | Fixed | b12 |
JDK-8070491 | emb-8u47 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
FULL PRODUCT VERSION :
java version "1.8.0_20"11:44:58 on console
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OS X 10.9.5
A DESCRIPTION OF THE PROBLEM :
Concatenating two arrays in JavaScript on Nashorn and translating it to Java returns an array that is too long and is filled with nulls at the end.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following JavaScript using Nashorn:
head = [0]
tail = [1, 2, 3];
list = head.concat(tail)
print(java.util.Arrays.toString(Java.to(list)));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected Output:
[0, 1, 2, 3]
ACTUAL -
Actual Output:
[0, 1, 2, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_20"11:44:58 on console
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OS X 10.9.5
A DESCRIPTION OF THE PROBLEM :
Concatenating two arrays in JavaScript on Nashorn and translating it to Java returns an array that is too long and is filled with nulls at the end.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following JavaScript using Nashorn:
head = [0]
tail = [1, 2, 3];
list = head.concat(tail)
print(java.util.Arrays.toString(Java.to(list)));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected Output:
[0, 1, 2, 3]
ACTUAL -
Actual Output:
[0, 1, 2, 3, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8061317 Concatenating an array and converting it to Java gives wrong result
-
- Resolved
-
-
JDK-8064254 Concatenating an array and converting it to Java gives wrong result
-
- Resolved
-
-
JDK-8070491 Concatenating an array and converting it to Java gives wrong result
-
- Resolved
-
-
JDK-8085746 Concatenating an array and converting it to Java gives wrong result
-
- Resolved
-