From 4cad437956ff75a377adba8a760e19dc6cf7dc8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Nie=C3=9Fing?= Date: Wed, 28 May 2025 01:54:48 +0000 Subject: [PATCH] 8357597: Proxy.getInvocationHandler throws NullPointerException instead of IllegalArgumentException for null Reviewed-by: rriggs, jpai, liach --- src/java.base/share/classes/java/lang/reflect/Proxy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java.base/share/classes/java/lang/reflect/Proxy.java b/src/java.base/share/classes/java/lang/reflect/Proxy.java index 83a1520ce08..dc512e86590 100644 --- a/src/java.base/share/classes/java/lang/reflect/Proxy.java +++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -967,6 +967,7 @@ public class Proxy implements java.io.Serializable { * @return the invocation handler for the proxy instance * @throws IllegalArgumentException if the argument is not a * proxy instance + * @throws NullPointerException if {@code proxy} is {@code null} */ public static InvocationHandler getInvocationHandler(Object proxy) throws IllegalArgumentException