JDK-8147845 : Varargs Array functions still leaking longs
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2016-01-20
  • Updated: 2016-04-27
  • Resolved: 2016-01-21
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 JDK 9
8u101Fixed 9 b103Fixed
Description
The varargs methods of the Array unshift() and push() methods can still return longs, which shouldn't be the case after JDK-8143896 as longs are no longer considered JavaScript Numbers. This normally only occurs with optimistic types disabled.

var x = [1, 2, 3];
print(x.push() === 3);    // prints false instead of true
print(x.unshift() === 3);  // prints false instead of true