From 15a8587c41b90c24fc918df53bdc1305b6201bd2 Mon Sep 17 00:00:00 2001 From: rriggs Date: Wed, 5 Feb 2014 10:59:55 -0500 Subject: [PATCH] 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 --- src/share/classes/java/time/Clock.java | 2 +- src/share/classes/java/time/Instant.java | 5 ----- src/share/classes/java/time/format/DateTimeFormatter.java | 5 +---- src/share/classes/java/time/temporal/TemporalAccessor.java | 2 +- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/share/classes/java/time/Clock.java b/src/share/classes/java/time/Clock.java index cd9082292..b1127848b 100644 --- a/src/share/classes/java/time/Clock.java +++ b/src/share/classes/java/time/Clock.java @@ -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. *

* The principal methods are defined to allow the throwing of an exception. diff --git a/src/share/classes/java/time/Instant.java b/src/share/classes/java/time/Instant.java index d91e1c865..dfd2627c1 100644 --- a/src/share/classes/java/time/Instant.java +++ b/src/share/classes/java/time/Instant.java @@ -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. *

- * 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. - *

* 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. diff --git a/src/share/classes/java/time/format/DateTimeFormatter.java b/src/share/classes/java/time/format/DateTimeFormatter.java index 4109d20e5..39d91986f 100644 --- a/src/share/classes/java/time/format/DateTimeFormatter.java +++ b/src/share/classes/java/time/format/DateTimeFormatter.java @@ -344,10 +344,7 @@ import java.util.Set; * Fraction: 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. *

* Year: The count of letters determines the minimum field width below * which padding is used. If the count of letters is two, then a diff --git a/src/share/classes/java/time/temporal/TemporalAccessor.java b/src/share/classes/java/time/temporal/TemporalAccessor.java index 081bbbaec..a6133e188 100644 --- a/src/share/classes/java/time/temporal/TemporalAccessor.java +++ b/src/share/classes/java/time/temporal/TemporalAccessor.java @@ -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) { -- GitLab