提交 15a8587c 编写于 作者: R rriggs

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
Summary: Update to fix typos, remove extraneous text
Reviewed-by: darcy, lancea, sherman, scolebourne
上级 0d0649d5
......@@ -104,7 +104,7 @@ import java.util.TimeZone;
* resolution clock if one is available.
*
* @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.
* <p>
* 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 might be used to record event time-stamps in the application.
* <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}.
* 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.
......
......@@ -344,10 +344,7 @@ import java.util.Set;
* <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
* 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
* 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.
* truncated, with only the most significant digits being output.
* <p>
* <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
......
......@@ -217,7 +217,7 @@ public interface TemporalAccessor {
default int get(TemporalField field) {
ValueRange range = range(field);
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);
if (range.isValidValue(value) == false) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册