8075678: java.time javadoc error in DateTimeFormatter::parsedLeapSecond

8075676: java.time package javadoc typos
8068276: java.time.chrono.HijrahChronology.eraOf() assertions may lead to misunderstanding

Reviewed-by: lancea, scolebourne
This commit is contained in:
Roger Riggs 2015-05-28 17:37:33 -04:00
parent 53a97cbeb3
commit 6c70d53d16
3 changed files with 17 additions and 6 deletions

View File

@ -490,6 +490,16 @@ public final class HijrahChronology extends AbstractChronology implements Serial
return yearOfEra; return yearOfEra;
} }
/**
* Creates the HijrahEra object from the numeric value.
* The Hijrah calendar system has only one era covering the
* proleptic years greater than zero.
* This method returns the singleton HijrahEra for the value 1.
*
* @param eraValue the era value
* @return the calendar system era, not null
* @throws DateTimeException if unable to create the era
*/
@Override @Override
public HijrahEra eraOf(int eraValue) { public HijrahEra eraOf(int eraValue) {
switch (eraValue) { switch (eraValue) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1333,8 +1333,8 @@ public final class DateTimeFormatter {
* If the time '23:59:60' is received, then a simple conversion is applied, * If the time '23:59:60' is received, then a simple conversion is applied,
* replacing the second-of-minute of 60 with 59. This query can be used * replacing the second-of-minute of 60 with 59. This query can be used
* on the parse result to determine if the leap-second adjustment was made. * on the parse result to determine if the leap-second adjustment was made.
* The query will return one second of excess if it did adjust to remove * The query will return {@code true} if it did adjust to remove the
* the leap-second, and zero if not. Note that applying a leap-second * leap-second, and {@code false} if not. Note that applying a leap-second
* smoothing mechanism, such as UTC-SLS, is the responsibility of the * smoothing mechanism, such as UTC-SLS, is the responsibility of the
* application, as follows: * application, as follows:
* <pre> * <pre>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -120,9 +120,10 @@
* *
* <h3>Duration and Period</h3> * <h3>Duration and Period</h3>
* <p> * <p>
* Beyond dates and times, the API also allows the storage of period and durations of time. * Beyond dates and times, the API also allows the storage of periods and durations of time.
* A {@link java.time.Duration} is a simple measure of time along the time-line in nanoseconds. * A {@link java.time.Duration} is a simple measure of time along the time-line in nanoseconds.
* A {@link java.time.Period} expresses an amount of time in units meaningful to humans, such as years or hours. * A {@link java.time.Period} expresses an amount of time in units meaningful
* to humans, such as years or days.
* </p> * </p>
* *
* <h3>Additional value types</h3> * <h3>Additional value types</h3>