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
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 the right fix, and makes the class more consist

Re: Missing throws declaration for NullPointerException in Proxy#getInvocationHandler

2025-05-22 Thread Chen Liang
Hello, I have created https://bugs.openjdk.org/browse/JDK-8357597 for this. Your analysis isn't quite correct - if you look at the method documentation, you would anticipate this to fail with an IllegalArgumentException instead of a NullPointerException. However, this mismatch has been there sinc