RFR: 8259922 MethodHandles.collectArguments does not follow its documentation
Johannes Kuhn
github.com+652983+dasbrain at openjdk.java.net
Thu Jan 21 23:25:42 UTC 2021
On Thu, 21 Jan 2021 22:54:56 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> 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.
>
> test/jdk/java/lang/invoke/8259922/TestMethodHandlesCollectArgs.java line 37:
>
>> 35: import static org.testng.Assert.*;
>> 36:
>> 37: public class TestMethodHandlesCollectArgs {
>
> I suggest to rename this test in `test/jdk/java/lang/invoke/MethodHandlesCollectArgsTest.java` matching existing convention and `CollectArgsTest.java` is also fine with me. The bug ID is already in @bug and I find the directory with bug ID adds noise.
Yeah, still learning where to put tests.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2171
More information about the hotspot-compiler-dev
mailing list