According to spec (http://download.java.net/jdk9/docs/api/java/lang/invoke/MethodHandles.html#loop-java.lang.invoke.MethodHandle:A...-), Step3.c: If a pred function is omitted, the corresponding fini function must also be omitted. Considering factorial example from specification, let's add null 'pred' and MH_fin 'fini' function to counterClause. Expected result: IllegalArgumentException. Actual result: no exceptions, code works as before Was found on jdk9 b106, b107. Tests are under development, tck_red label will be added after development completion. Example attached
|