Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Justin Lu
On Wed, 25 Jan 2023 19:55:09 GMT, Lance Andersen wrote: >> 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** th

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Lance Andersen
On Wed, 25 Jan 2023 19:33:29 GMT, Justin Lu wrote: >> 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} i

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Justin Lu
On Wed, 25 Jan 2023 19:15:45 GMT, Lance Andersen 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:

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Lance Andersen
On Wed, 25 Jan 2023 18:12:10 GMT, Justin Lu wrote: >> When their input is null, the following methods in java.util.TimeZone throw >> a NullPointerException: >> >> _TimeZone.getTimeZone(String ID) >> TimeZone.setID(String ID) >> TimeZone.inDaylightTime(Date date)_ >> >> For example, >> >> >>

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v7]

2023-01-25 Thread Justin Lu
> When their input is null, the following methods in java.util.TimeZone throw a > NullPointerException: > > TimeZone.getTimeZone(String ID) > TimeZone.setID(String ID) > TimeZone.inDaylightTime(Date date) > > For example, > > > String someID = null; > TimeZone tz1 = TimeZone.getTimeZone(someI