On 05/05/2025 21:05, Steffen Nießing wrote:
Hello,
recently I've discovered that the JavaDoc of the instance methods of
java.net.http.HttpHeaders lacks the throws declarations for
NullPointerExceptions. The static creator method `of` contains such a
declaration. So the snippet `HttpHeaders.of
Hello Steffen,
I think this is fine. In the package summary of java.net.http, the last
sentence says:
Unless otherwise stated, null parameter values will cause methods of all
classes in this package to throw NullPointerException.
The method you mentioned in particular does mention NPE, but that