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

JDK-8288573: Make Executable.getParameterCount() actually abstract #9192

Closed
wants to merge 2 commits into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Jun 16, 2022

Whatever the motivation for how this method was coded when added in JDK 8, since Executable is now a sealed class with Constructor and Method the only allowed subclasses, getParameterCount can be coded as an normal abstract method. (The implementation of getParameterCount in Method and Constructor use fields private to each of those classes so the code cannot easily be shared in Executable).

Please also review the small accompanying CSR: https://bugs.openjdk.org/browse/JDK-8288630


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires a CSR request to be approved

Issues

  • JDK-8288573: Make Executable.getParameterCount() actually abstract
  • JDK-8288630: Make Executable.getParameterCount() actually abstract (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9192/head:pull/9192
$ git checkout pull/9192

Update a local copy of the PR:
$ git checkout pull/9192
$ git pull https://git.openjdk.org/jdk pull/9192/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9192

View PR using the GUI difftool:
$ git pr show -t 9192

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9192.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 16, 2022

👋 Welcome back darcy! 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 openjdk bot added the rfr Pull request is ready for review label Jun 16, 2022
@openjdk
Copy link

openjdk bot commented Jun 16, 2022

@jddarcy The following label will be automatically applied to this pull request:

  • core-libs

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

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Jun 16, 2022
@mlbridge
Copy link

mlbridge bot commented Jun 16, 2022

Webrevs

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Jun 16, 2022
Copy link
Member

@irisclark irisclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Associated CSR also Reviewed.

Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks fine to me. The copyright year on this file will need an update, which I guess you would be doing before integrating this.

@ExE-Boss
Copy link

ExE-Boss commented Jun 17, 2022

Note that the PR title actually needs to be Make<NBSP>`java.lang.reflect.Executable::getParameterCount()` actually<NBSP>abstract with <NBSP> being replaced by the NO‑BREAK SPACE (U+00A0) code point (alt+0160).


This is because I use non‑breaking spaces a lot.

@jddarcy jddarcy changed the title JDK-8288573: Make `java.lang.reflect.Executable::getParameterCount()' actually abstract JDK-8288630: Make Executable.getParameterCount() actually abstract Jun 17, 2022
@jddarcy jddarcy changed the title JDK-8288630: Make Executable.getParameterCount() actually abstract JDK-8288573: Make Executable.getParameterCount() actually abstract Jun 17, 2022
@jddarcy
Copy link
Member Author

jddarcy commented Jun 17, 2022

/csr unneeded

@openjdk
Copy link

openjdk bot commented Jun 17, 2022

@jddarcy The CSR requirement cannot be removed as there is already a CSR associated with the main issue of this pull request. Please withdraw the CSR JDK-8288630 and then use the command /csr unneeded again.

@jddarcy
Copy link
Member Author

jddarcy commented Jun 17, 2022

/csr

@openjdk
Copy link

openjdk bot commented Jun 17, 2022

@jddarcy an approved CSR request is already required for this pull request.

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Jun 17, 2022
@openjdk
Copy link

openjdk bot commented Jun 17, 2022

@jddarcy 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:

8288573: Make Executable.getParameterCount() actually abstract

Reviewed-by: iris, alanb, jpai

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 8 new commits pushed to the master branch:

  • af64d31: Merge
  • 53bf1bf: 8286176: Add JNI_VERSION_19 to jni.h and JNI spec
  • c254c9d: 8287401: jpackage tests failing on Windows due to powershell issue
  • ff3db52: 8288534: Out of bound errors for memory segment access mentions wrong values
  • cc44592: 8287904: Reduce runtime of java.net microbenchmarks
  • 523d553: 8282777: Create a Regression test for JDK-4515031
  • f3da7ff: 8288421: IGV: warn user about all unreachable nodes
  • 9d4b25e: 8288281: compiler/vectorapi/VectorFPtoIntCastTest.java failed with "IRViolationException: There were one or multiple IR rule failures."

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 17, 2022
@jddarcy
Copy link
Member Author

jddarcy commented Jun 17, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jun 17, 2022

Going to push as commit 47b8669.
Since your change was applied there have been 8 commits pushed to the master branch:

  • af64d31: Merge
  • 53bf1bf: 8286176: Add JNI_VERSION_19 to jni.h and JNI spec
  • c254c9d: 8287401: jpackage tests failing on Windows due to powershell issue
  • ff3db52: 8288534: Out of bound errors for memory segment access mentions wrong values
  • cc44592: 8287904: Reduce runtime of java.net microbenchmarks
  • 523d553: 8282777: Create a Regression test for JDK-4515031
  • f3da7ff: 8288421: IGV: warn user about all unreachable nodes
  • 9d4b25e: 8288281: compiler/vectorapi/VectorFPtoIntCastTest.java failed with "IRViolationException: There were one or multiple IR rule failures."

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 17, 2022
@openjdk openjdk bot closed this Jun 17, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 17, 2022
@openjdk
Copy link

openjdk bot commented Jun 17, 2022

@jddarcy Pushed as commit 47b8669.

💡 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
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
5 participants