-
Sub-task
-
Resolution: Fixed
-
P4
-
None
-
None
-
None
According to MethodHandles.countedLoop(MH, MH, MH) passing body = null should lead to IllegalArgumentException.
Actual result is NullPointerException.
Exception in thread "main" java.lang.NullPointerException
at java.lang.invoke.MethodHandles.dropArguments(MethodHandles.java:2526)
at java.lang.invoke.MethodHandles.dropArguments(MethodHandles.java:2601)
at java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:3767)
at java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:3697)
at CountedLoopTest1.main(CountedLoopTest1.java:11)
Was found on jdk9b107/jdk9b108, tests are under development.
tck_red label will be added after tests completion.
Example is attached.
The same situation is in MethodHandles.countedLoop(MH, MH, MH, MH)
Actual result is NullPointerException.
Exception in thread "main" java.lang.NullPointerException
at java.lang.invoke.MethodHandles.dropArguments(MethodHandles.java:2526)
at java.lang.invoke.MethodHandles.dropArguments(MethodHandles.java:2601)
at java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:3767)
at java.lang.invoke.MethodHandles.countedLoop(MethodHandles.java:3697)
at CountedLoopTest1.main(CountedLoopTest1.java:11)
Was found on jdk9b107/jdk9b108, tests are under development.
tck_red label will be added after tests completion.
Example is attached.
The same situation is in MethodHandles.countedLoop(MH, MH, MH, MH)
- relates to
-
JDK-8151026 j.l.i.MethodHandles.whileLoop(...) and j.l.i.MethodHandles.doWhileLoop(...) both permit body = null
- Resolved
-
JDK-8154751 MethodHandles.countedLoop does not accept empty bodies
- Closed