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

Accept a null array of parameter types for more methods. #98

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/java.base/share/classes/java/lang/Class.java
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,7 @@ public Method getMethod(String name, Class<?> @Nullable ... parameterTypes)
*/

@CallerSensitive
public Constructor<T> getConstructor(Class<?>... parameterTypes)
public Constructor<T> getConstructor(Class<?> @Nullable ... parameterTypes)
throws NoSuchMethodException, SecurityException
{
@SuppressWarnings("removal")
Expand Down Expand Up @@ -2923,7 +2923,7 @@ public Field getDeclaredField(String name)
* @since 1.1
*/
@CallerSensitive
public Method getDeclaredMethod(String name, Class<?>... parameterTypes)
public Method getDeclaredMethod(String name, Class<?> @Nullable ... parameterTypes)
throws NoSuchMethodException, SecurityException {
Objects.requireNonNull(name);
@SuppressWarnings("removal")
Expand Down Expand Up @@ -3020,7 +3020,7 @@ Method findMethod(boolean publicOnly, String name, Class<?>... parameterTypes) {
* @since 1.1
*/
@CallerSensitive
public Constructor<T> getDeclaredConstructor(Class<?>... parameterTypes)
public Constructor<T> getDeclaredConstructor(Class<?> @Nullable ... parameterTypes)
throws NoSuchMethodException, SecurityException
{
@SuppressWarnings("removal")
Expand Down
Loading