On Thu, 9 Nov 2023 09:34:26 GMT, Viktor Klang <vkl...@openjdk.org> wrote:

>> I think it's still better to specify this for every method. Many developers 
>> read the documentation only for the specific method they are going to call, 
>> using IDE features like quick documentation.
>
> Yeah, I agree with @amaembo, I think it is important to keep the contract 
> close to the caller.

I don't mind either way - just wanted to note that the notion of blanket 
statements for `NullPointerException` is used in several areas 
([java.util.logging](https://docs.oracle.com/en/java/javase/21/docs/api/java.logging/java/util/logging/package-summary.html),
 
[java.net.http](https://docs.oracle.com/en/java/javase/21/docs/api/java.net.http/java/net/http/package-summary.html)
 ...). So there is an established precedent if you were inclined to go this 
route.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1387889210

Reply via email to