Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8259922 MethodHandles.collectArguments does not throw IAE if pos is outside the arity range #2171

Closed
wants to merge 5 commits into from

Conversation

@DasBrain
Copy link
Member

@DasBrain DasBrain commented Jan 20, 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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8259922: MethodHandles.collectArguments does not throw IAE if pos is outside the arity range

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2171/head:pull/2171
$ git checkout pull/2171

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jan 20, 2021

👋 Welcome back DasBrain! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

@openjdk openjdk bot commented Jan 20, 2021

@DasBrain The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr label Jan 20, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jan 20, 2021

Webrevs

Copy link
Member

@mlchung mlchung left a comment

Thanks for fixing this. I can sponsor this for you.

Copy link
Member

@mlchung mlchung left a comment

Looks good. What tests have you ran?

@DasBrain
Copy link
Member Author

@DasBrain DasBrain commented Jan 22, 2021

On the latest commit, only my own test.
On the previous commit (4f74e2d) I did run the full tier1.

Currently a full test tier1 run on my machine and github actions is in progress.

@DasBrain DasBrain changed the title 8259922 MethodHandles.collectArguments does not follow its documentation 8259922 MethodHandles.collectArguments does not throw IAE if pos is outside the arity range Jan 22, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 22, 2021

@DasBrain This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8259922: MethodHandles.collectArguments does not throw IAE if pos is outside the arity range

Reviewed-by: mchung

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 39 new commits pushed to the master branch:

  • 92c2f08: 8259869: [macOS] Remove desktop module dependencies on JNF Reference APIs
  • a7c2ebc: 8239894: Xserver crashes when the wrong high refresh rate is used
  • 2f47c39: 8259943: FileDescriptor.close0 does not handle EINTR
  • a8073ef: 8253478: (se) epoll Selector should use eventfd for wakeup instead of pipe
  • 34eb8b3: 8255765: Shenandoah: Isolate concurrent, degenerated and full GC
  • c3c6662: 8259954: gc/shenandoah/mxbeans tests fail with -Xcomp
  • 6ce0799: 8259851: Use boolean type for tasks in SubTasksDone
  • 4bcffeb: 8260029: aarch64: fix typo in verify_oop_array
  • e1de0bf: 8260043: Reduce allocation in sun.net.www.protocol.jar.Handler.parseURL
  • 4dfd8cc: 8259897: gtest os.dll_address_to_function_and_library_name_vm fails on AIX
  • ... and 29 more: https://git.openjdk.java.net/jdk/compare/c0e9c44628aacbb31e5d6e60f3820b9dc8823323...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@mlchung) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Jan 22, 2021
@DasBrain
Copy link
Member Author

@DasBrain DasBrain commented Jan 22, 2021

Tests did run successfully on my machine (win 64) and github actions.
Let me know if there should be additional tests that I should run.

@DasBrain
Copy link
Member Author

@DasBrain DasBrain commented Jan 22, 2021

/integrate

@openjdk openjdk bot added the sponsor label Jan 22, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jan 22, 2021

@DasBrain
Your change (at version f01fefa) is now ready to be sponsored by a Committer.

@mlchung
Copy link
Member

@mlchung mlchung commented Jan 22, 2021

/sponsor

@openjdk
Copy link

@openjdk openjdk bot commented Jan 22, 2021

@mlchung @DasBrain Since your change was applied there have been 52 commits pushed to the master branch:

  • 0ea5862: 8260053: Optimize Tokens' use of Names
  • 18eb6d9: 8255348: NPE in PKIXCertPathValidator event logging code
  • a97f3c1: 8258853: Support separate function declaration and definition with ENABLE_IF-based SFINAE
  • 154e1d6: 8259009: G1 heap summary should be shown in "Heap Parameters" window on HSDB
  • acbcde8: 8256111: Create implementation for NSAccessibilityStaticText protocol
  • f928265: 8260009: InstanceKlass::has_as_permitted_subclass() fails if subclass was redefined
  • 7ed8ba1: 8256814: WeakProcessorPhases may be redundant
  • bfac3fb: 8260212: Shenandoah: resolve-only UpdateRefsMode is not used
  • 58ceb25: 8259842: Remove Result cache from StringCoding
  • d066f2b: 8260030: Improve stringStream buffer handling
  • ... and 42 more: https://git.openjdk.java.net/jdk/compare/c0e9c44628aacbb31e5d6e60f3820b9dc8823323...master

Your commit was automatically rebased without conflicts.

Pushed as commit bf5e801.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants