JDK-8161069 : MethodHandles.dropArgumentsToMatch(MethodHandle, int, List, int) readability
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-07-08
  • Updated: 2016-08-04
  • Resolved: 2016-08-04
Description
1. MethodHandles.dropArgumentsToMatch (...) is really hard to understand. It is not critical. But it would be good to make spec clearer, e.g. describe concatenation process in clearer way. 

2. The phrase "Some leading parameters are first skipped; they will be left unchanged and are otherwise ignored." leads to misunderstanding. I'm not sure that 'otherwise ignored' could be treated in right way here. 


3. The phrase "More precisely, elements in the new list before pos are inserted into the target list at skip, while elements in the new list after the match beginning at pos are inserted at the end of the target list." uses term 'target list'. It could lead to misunderstanding because it looks like we are modifying target's list. But MethodHandle is immutable (see MethodHandle api doc: "Method handles are immutable").

Comments
This is fixed internally; the fix will be pushed with JDK-8151179.
04-08-2016