JDK-8129410 : Java adapters with class-level overrides should preserve variable arity constructors
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-06-22
  • Updated: 2015-09-29
  • Resolved: 2015-06-23
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
8u60Fixed 9 b71Fixed
Description
If a class has a variable arity constructor, e.g. VarArgClass(String... x), and we create a class-level Java adapter for it using Java.extend(VarArgClass, { ... }), the variable constructor in the adapter should also be variable arity.

We lose variable arity constructors for adapters with instance-level overrides as we need to pass an extra trailing argument in the constructor, but there's no reason to lose them for class-level overrides.