RFR: JDK-8288573: Make `java.lang.reflect.Executable::getParameterCount()' actually abstract
Joe Darcy
darcy at openjdk.org
Thu Jun 16 21:30:12 UTC 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
-------------
Commit messages:
- JDK-8288573: Make `java.lang.reflect.Executable::getParameterCount()` actually abstract
Changes: https://git.openjdk.org/jdk/pull/9192/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9192&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8288573
Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/9192.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9192/head:pull/9192
PR: https://git.openjdk.org/jdk/pull/9192
More information about the core-libs-dev
mailing list