RFR: JDK-8288573: Make `java.lang.reflect.Executable::getParameterCount()' actually abstract

ExE Boss duke at openjdk.org
Fri Jun 17 10:54:09 UTC 2022


On Thu, 16 Jun 2022 21:21:36 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> 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

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 (<kbd>alt</kbd>+<kbd>0</kbd><kbd>1</kbd><kbd>6</kbd><kbd>0</kbd>).

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

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

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

PR: https://git.openjdk.org/jdk/pull/9192


More information about the core-libs-dev mailing list