8177418: NPE is not apparent for methods in java.util.TimeZone API docs

Reviewed-by: lancea, naoto
This commit is contained in:
Justin Lu 2023-01-27 18:11:20 +00:00 committed by Naoto Sato
parent 7aaf76c529
commit 22c976a9b0
2 changed files with 19 additions and 3 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -839,8 +839,12 @@ public class SimpleTimeZone extends TimeZone {
/**
* Queries if the given date is in daylight saving time.
* @implSpec The default implementation throws a
* {@code NullPointerException} if {@code date} is {@code null}
* @return true if daylight saving time is in effective at the
* given date; false otherwise.
* @throws NullPointerException This method may throw a
* {@code NullPointerException} if {@code date} is {@code null}
*/
public boolean inDaylightTime(Date date)
{