--- old/src/java.base/share/classes/java/text/DateFormat.java 2017-01-05 11:39:15.958987999 +0530
+++ new/src/java.base/share/classes/java/text/DateFormat.java 2017-01-05 11:39:15.723105999 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, 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
@@ -141,6 +141,25 @@
* If multiple threads access a format concurrently, it must be synchronized
* externally.
*
+ * @implSpec
+ *
- The {@link #format(Date, StringBuffer, FieldPosition)} and
+ * {@link #parse(String, ParsePosition)} methods may throw
+ * {@code NullPointerException}, if any of their parameter is {@code null}.
+ * The subclass may provide its own implementation and specification about
+ * {@code NullPointerException}.
+ * - The {@link #setCalendar(Calendar)}, {@link
+ * #setNumberFormat(NumberFormat)} and {@link #setTimeZone(TimeZone)} methods
+ * do not throw {@code NullPointerException} when their parameter is
+ * {@code null}, but any subsequent operations on the same instance may throw
+ * {@code NullPointerException}.
+ * - The {@link #getCalendar()}, {@link #getNumberFormat()} and
+ * {@link getTimeZone()} methods may return {@code null}, if the respective
+ * values of this instance is set to {@code null} through the corresponding
+ * setter methods. For Example: {@link #getTimeZone()} may return {@code null},
+ * if the {@code TimeZone} value of this instance is set as
+ * {@link #setTimeZone(java.util.TimeZone) setTimeZone(null)}.
+ *
+ *
* @see Format
* @see NumberFormat
* @see SimpleDateFormat
@@ -296,6 +315,8 @@
* the begin index and end index of fieldPosition will be set to
* 5 and 8, respectively, for the first occurrence of the timezone
* pattern character 'z'.
+ * @exception IllegalArgumentException if the {@code Format} cannot format
+ * the given {@code obj}.
* @see java.text.Format
*/
public final StringBuffer format(Object obj, StringBuffer toAppendTo,