Details
Description
A colleague suggests these fixes to Duration.java:
--- a/src/java.base/share/classes/java/time/Duration.java
+++ b/src/java.base/share/classes/java/time/Duration.java
@@ -306,1 +306,1 @@
- * @throws DateTimeException if the period unit has an estimated duration
+ * @throws DateTimeException if the unit has an estimated duration
@@ -353,1 +353,1 @@
- * or positive symbol. If negative, the whole period is negated.
+ * or positive symbol. If negative, the whole duration is negated.
@@ -477,1 +477,1 @@
- * The result of this method can be a negative period if the end is before the start.
+ * The result of this method can be a negative duration if the end is before the start.
@@ -656,1 +656,1 @@
- * @return a {@code Duration} based on this period with the requested seconds, not null
+ * @return a {@code Duration} based on this duration with the requested seconds, not null
@@ -671,1 +671,1 @@
- * @return a {@code Duration} based on this period with the requested nano-of-second, not null
+ * @return a {@code Duration} based on this duration with the requested nano-of-second, not null
--- a/src/java.base/share/classes/java/time/Duration.java
+++ b/src/java.base/share/classes/java/time/Duration.java
@@ -306,1 +306,1 @@
- * @throws DateTimeException if the period unit has an estimated duration
+ * @throws DateTimeException if the unit has an estimated duration
@@ -353,1 +353,1 @@
- * or positive symbol. If negative, the whole period is negated.
+ * or positive symbol. If negative, the whole duration is negated.
@@ -477,1 +477,1 @@
- * The result of this method can be a negative period if the end is before the start.
+ * The result of this method can be a negative duration if the end is before the start.
@@ -656,1 +656,1 @@
- * @return a {@code Duration} based on this period with the requested seconds, not null
+ * @return a {@code Duration} based on this duration with the requested seconds, not null
@@ -671,1 +671,1 @@
- * @return a {@code Duration} based on this period with the requested nano-of-second, not null
+ * @return a {@code Duration} based on this duration with the requested nano-of-second, not null