On Wed, 25 Jan 2023 19:15:45 GMT, Lance Andersen <lan...@openjdk.org> wrote:
>> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adjust ImplSpec positioning and wording > > src/java.base/share/classes/java/util/TimeZone.java line 300: > >> 298: * @param ID the new time zone ID. >> 299: * @throws NullPointerException This method may throw a >> 300: * {@code NullPointerException} if {@code ID} is {@code null} > > Is this needed given it is covered in the implSpec as it seems redundant In the CSR, Joe brought up the point that since _Time Zone_ is a non final class, and these instance methods can be overridden, there exists the possibility of an external subclass that overrides the method and does **not** throw an NPE. That is why in the @throws: section, the wording is weakened from _will_ throw an NPE to _may._ The **@ImplSpec** is then added on to state that Time Zone's default implementation of the particular method _does_ indeed throw an NPE. ------------- PR: https://git.openjdk.org/jdk/pull/11888