-
Enhancement
-
Resolution: Fixed
-
P4
-
9
-
b81
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142261 | emb-9 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | team |
JDK-8140973 | 8u91 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b01 |
JDK-8134881 | 8u72 | Sundararajan Athijegannathan | P4 | Closed | Fixed | b01 |
JDK-8147341 | emb-8u91 | Sundararajan Athijegannathan | P4 | Resolved | Fixed | b01 |
Given this test interface:
package jdk.nashorn.test.models;
@FunctionalInterface
public interface VarArgConsumer {
public void apply(Object... o);
}
This won't work:
var c = new (Java.type("jdk.nashorn.test.models.VarArgConsumer"))(
function() { print(arguments.length) });
c(1, 2, 3)
A solution would be to rely on Dynalink's DynamicMethod instead of reflective Method.
package jdk.nashorn.test.models;
@FunctionalInterface
public interface VarArgConsumer {
public void apply(Object... o);
}
This won't work:
var c = new (Java.type("jdk.nashorn.test.models.VarArgConsumer"))(
function() { print(arguments.length) });
c(1, 2, 3)
A solution would be to rely on Dynalink's DynamicMethod instead of reflective Method.
- backported by
-
JDK-8140973 Can't invoke vararg @FunctionalInterface methods
-
- Resolved
-
-
JDK-8142261 Can't invoke vararg @FunctionalInterface methods
-
- Resolved
-
-
JDK-8147341 Can't invoke vararg @FunctionalInterface methods
-
- Resolved
-
-
JDK-8134881 Can't invoke vararg @FunctionalInterface methods
-
- Closed
-
- relates to
-
JDK-8068901 Surprising behavior with more than one functional interface on a class
-
- Resolved
-