8032749: Typo in java.time.Clock
8032888: Error message typo in TemporalAccessor 8032558: Instant spec includes incorrect assertion wrt valid range 8032494: DateTimeFormatter spec includes irrelevent detail on parsing pattern Update to fix typos, remove extraneous text Reviewed-by: darcy, lancea, sherman, scolebourne
This commit is contained in:
parent
5804adca86
commit
8ca6ca944b
@ -104,7 +104,7 @@ import java.util.TimeZone;
|
|||||||
* resolution clock if one is available.
|
* resolution clock if one is available.
|
||||||
*
|
*
|
||||||
* @implSpec
|
* @implSpec
|
||||||
* This abstract class must be implemented with care to ensure other operate correctly.
|
* This abstract class must be implemented with care to ensure other classes operate correctly.
|
||||||
* All implementations that can be instantiated must be final, immutable and thread-safe.
|
* All implementations that can be instantiated must be final, immutable and thread-safe.
|
||||||
* <p>
|
* <p>
|
||||||
* The principal methods are defined to allow the throwing of an exception.
|
* The principal methods are defined to allow the throwing of an exception.
|
||||||
|
@ -100,11 +100,6 @@ import java.util.Objects;
|
|||||||
* This class models a single instantaneous point on the time-line.
|
* This class models a single instantaneous point on the time-line.
|
||||||
* This might be used to record event time-stamps in the application.
|
* This might be used to record event time-stamps in the application.
|
||||||
* <p>
|
* <p>
|
||||||
* For practicality, the instant is stored with some constraints.
|
|
||||||
* The measurable time-line is restricted to the number of seconds that can be held
|
|
||||||
* in a {@code long}. This is greater than the current estimated age of the universe.
|
|
||||||
* The instant is stored to nanosecond resolution.
|
|
||||||
* <p>
|
|
||||||
* The range of an instant requires the storage of a number larger than a {@code long}.
|
* The range of an instant requires the storage of a number larger than a {@code long}.
|
||||||
* To achieve this, the class stores a {@code long} representing epoch-seconds and an
|
* To achieve this, the class stores a {@code long} representing epoch-seconds and an
|
||||||
* {@code int} representing nanosecond-of-second, which will always be between 0 and 999,999,999.
|
* {@code int} representing nanosecond-of-second, which will always be between 0 and 999,999,999.
|
||||||
|
@ -344,10 +344,7 @@ import java.util.Set;
|
|||||||
* <b>Fraction</b>: Outputs the nano-of-second field as a fraction-of-second.
|
* <b>Fraction</b>: Outputs the nano-of-second field as a fraction-of-second.
|
||||||
* The nano-of-second value has nine digits, thus the count of pattern letters
|
* The nano-of-second value has nine digits, thus the count of pattern letters
|
||||||
* is from 1 to 9. If it is less than 9, then the nano-of-second value is
|
* is from 1 to 9. If it is less than 9, then the nano-of-second value is
|
||||||
* truncated, with only the most significant digits being output. When parsing
|
* truncated, with only the most significant digits being output.
|
||||||
* in strict mode, the number of parsed digits must match the count of pattern
|
|
||||||
* letters. When parsing in lenient mode, the number of parsed digits must be at
|
|
||||||
* least the count of pattern letters, up to 9 digits.
|
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Year</b>: The count of letters determines the minimum field width below
|
* <b>Year</b>: The count of letters determines the minimum field width below
|
||||||
* which padding is used. If the count of letters is two, then a
|
* which padding is used. If the count of letters is two, then a
|
||||||
|
@ -217,7 +217,7 @@ public interface TemporalAccessor {
|
|||||||
default int get(TemporalField field) {
|
default int get(TemporalField field) {
|
||||||
ValueRange range = range(field);
|
ValueRange range = range(field);
|
||||||
if (range.isIntValue() == false) {
|
if (range.isIntValue() == false) {
|
||||||
throw new UnsupportedTemporalTypeException("Invalid field " + field + " + for get() method, use getLong() instead");
|
throw new UnsupportedTemporalTypeException("Invalid field " + field + " for get() method, use getLong() instead");
|
||||||
}
|
}
|
||||||
long value = getLong(field);
|
long value = getLong(field);
|
||||||
if (range.isValidValue(value) == false) {
|
if (range.isValidValue(value) == false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user