-
Bug
-
Resolution: Duplicate
-
P2
-
7
-
generic
-
generic
The following test case:
public class Test {
public static void main(String[] args) throws Exception {
java.lang.invoke.MethodHandles.constant(boolean.class, true);
}
}
throws an exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at Test.main(Test.java:5)
Caused by: java.lang.IllegalArgumentException: no leading reference parameter: true
at java.lang.invoke.MethodHandleStatics.newIllegalArgumentException(MethodHandleStatics.java:81)
at java.lang.invoke.MethodHandle.bindTo(MethodHandle.java:1009)
at java.lang.invoke.MethodHandles.constant(MethodHandles.java:1625)
...
public class Test {
public static void main(String[] args) throws Exception {
java.lang.invoke.MethodHandles.constant(boolean.class, true);
}
}
throws an exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at Test.main(Test.java:5)
Caused by: java.lang.IllegalArgumentException: no leading reference parameter: true
at java.lang.invoke.MethodHandleStatics.newIllegalArgumentException(MethodHandleStatics.java:81)
at java.lang.invoke.MethodHandle.bindTo(MethodHandle.java:1009)
at java.lang.invoke.MethodHandles.constant(MethodHandles.java:1625)
...
- duplicates
-
JDK-6939861 JVM should handle more conversion operations
- Closed
- relates to
-
JDK-7032323 code changes for JSR 292 EG adjustments to API, through Public Review
- Closed