mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6218123: (cal) API: Spec for GregorianCalendar constructors and Calendar getInstance is inconsistent.
Reviewed-by: naoto
This commit is contained in:
parent
a43a17c8ea
commit
42965d390c
2 changed files with 6 additions and 0 deletions
|
@ -1632,6 +1632,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
*
|
||||
* @param zone the time zone to use
|
||||
* @return a Calendar.
|
||||
* @throws NullPointerException if {@code zone} is {@code null}
|
||||
*/
|
||||
public static Calendar getInstance(TimeZone zone)
|
||||
{
|
||||
|
@ -1649,6 +1650,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
*
|
||||
* @param aLocale the locale for the week data
|
||||
* @return a Calendar.
|
||||
* @throws NullPointerException if {@code aLocale} is {@code null}
|
||||
*/
|
||||
public static Calendar getInstance(Locale aLocale)
|
||||
{
|
||||
|
@ -1663,6 +1665,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* @param zone the time zone to use
|
||||
* @param aLocale the locale for the week data
|
||||
* @return a Calendar.
|
||||
* @throws NullPointerException if {@code zone} or {@code aLocale} is {@code null}
|
||||
*/
|
||||
public static Calendar getInstance(TimeZone zone,
|
||||
Locale aLocale)
|
||||
|
|
|
@ -599,6 +599,7 @@ public class GregorianCalendar extends Calendar {
|
|||
* {@link Locale.Category#FORMAT FORMAT} locale.
|
||||
*
|
||||
* @param zone the given time zone.
|
||||
* @throws NullPointerException if {@code zone} is {@code null}
|
||||
*/
|
||||
public GregorianCalendar(TimeZone zone) {
|
||||
this(zone, Locale.getDefault(Locale.Category.FORMAT));
|
||||
|
@ -609,6 +610,7 @@ public class GregorianCalendar extends Calendar {
|
|||
* in the default time zone with the given locale.
|
||||
*
|
||||
* @param aLocale the given locale.
|
||||
* @throws NullPointerException if {@code aLocale} is {@code null}
|
||||
*/
|
||||
public GregorianCalendar(Locale aLocale) {
|
||||
this(TimeZone.getDefaultRef(), aLocale);
|
||||
|
@ -621,6 +623,7 @@ public class GregorianCalendar extends Calendar {
|
|||
*
|
||||
* @param zone the given time zone.
|
||||
* @param aLocale the given locale.
|
||||
* @throws NullPointerException if {@code zone} or {@code aLocale} is {@code null}
|
||||
*/
|
||||
public GregorianCalendar(TimeZone zone, Locale aLocale) {
|
||||
super(zone, aLocale);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue