RFR: 8259922 MethodHandles.collectArguments does not follow its documentation

Johannes Kuhn github.com+652983+dasbrain at openjdk.java.net
Wed Jan 20 18:35:10 UTC 2021


Add explicit range check to `MethodHandles.collectArgumentsCheck`.  
Added test case that exercises all cases.

This is a behavioral change, from throwing an unspecified exception to throwing an IllegalArgumentException, as specified.  
No spec change needed, as the IllegalArgumentException is already specified to be thrown in those cases.

Feel free to suggest a better place for the tests.

-------------

Commit messages:
 - Fix tailing whitespace in in MethodHandles.java
 - Fix copyright yeahr in MethodHandles.java
 - Fix JDK-8259922
 - Fix JDK-8259922.

Changes: https://git.openjdk.java.net/jdk/pull/2171/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2171&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8259922
  Stats: 100 lines in 2 files changed: 99 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2171.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2171/head:pull/2171

PR: https://git.openjdk.java.net/jdk/pull/2171


More information about the hotspot-compiler-dev mailing list