Re: Missing throws declaration for NullPointerException in Proxy#getInvocationHandler

2025-05-22 Thread Alan Bateman
On 22/05/2025 21:33, Kevin Bourrillion wrote: I think Steffen is almost certainly right that this was an accidental omission. That omission results in the `@throws IAE` line being *interpreted* as also applying to null, but I doubt it was ever meant that way. I think adding a `@throws NPE` is

Re: Missing throws declaration for NullPointerException in Proxy#getInvocationHandler

2025-05-22 Thread Kevin Bourrillion
s.java.com/ Regard, Chen From: core-libs-dev on behalf of Steffen Nießing Sent: Thursday, May 22, 2025 1:12 PM To: core-libs-dev@openjdk.org Subject: Missing throws declaration for NullPointerException in Proxy#getInvocationHandler Hi, recently I've

Re: Missing throws declaration for NullPointerException in Proxy#getInvocationHandler

2025-05-22 Thread Chen Liang
1:12 PM To: core-libs-dev@openjdk.org Subject: Missing throws declaration for NullPointerException in Proxy#getInvocationHandler Hi, recently I've come across the documentation of Proxy#getInvocationHandler(Object) and recognized that there's a missing throws declaration for a NullP

Missing throws declaration for NullPointerException in Proxy#getInvocationHandler

2025-05-22 Thread Steffen Nießing
Hi, recently I've come across the documentation of Proxy#getInvocationHandler(Object) and recognized that there's a missing throws declaration for a NullPointerException. The expression Proxy.getInvocationHandler(null) fails, because proxy.getClass() is called without asserting that proxy is n