We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65bfe09 commit 57f92d2Copy full SHA for 57f92d2
src/java.base/share/classes/java/util/Calendar.java
@@ -1796,8 +1796,10 @@ public final Date getTime() {
1796
* @param date the given Date.
1797
* @see #getTime()
1798
* @see #setTimeInMillis(long)
1799
+ * @throws NullPointerException if {@code date} is {@code null}
1800
*/
1801
public final void setTime(Date date) {
1802
+ Objects.requireNonNull(date, "date must not be null");
1803
setTimeInMillis(date.getTime());
1804
}
1805
0 commit comments