JDK-8005625 : MethodHandles.catchException can produce wrong type result if arity is 9 or more
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2012-12-31
  • Updated: 2013-09-11
  • Resolved: 2013-09-11
Related Reports
Duplicate :  
Description
If MethodHandles.catchException is given a MH argument with 9 or more parameters of type other than Object, the returned MH will have the correct arity but wrong argument types (Object).

The bug was first reported here:

http://mail.openjdk.java.net/pipermail/mlvm-dev/2012-December/005136.html

The fix is to add a call to makePairwiseConvert in the 'else' clause of MethodHandleImpl.makeGuardWithCatch.