8075678: java.time javadoc error in DateTimeFormatter::parsedLeapSecond
authorrriggs
Thu, 28 May 2015 17:37:33 -0400
changeset 30821 9bc6f2e9966b
parent 30820 0d4717a011d3
child 30822 e26f66cc0f05
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
jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java
jdk/src/java.base/share/classes/java/time/package-info.java
--- a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Thu May 28 10:54:48 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Thu May 28 17:37:33 2015 -0400
@@ -490,6 +490,16 @@
         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
     public HijrahEra eraOf(int eraValue) {
         switch (eraValue) {
--- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Thu May 28 10:54:48 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Thu May 28 17:37:33 2015 -0400
@@ -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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1333,8 +1333,8 @@
      * 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
      * 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 leap-second, and zero if not. Note that applying a leap-second
+     * The query will return {@code true} if it did adjust to remove the
+     * leap-second, and {@code false} if not. Note that applying a leap-second
      * smoothing mechanism, such as UTC-SLS, is the responsibility of the
      * application, as follows:
      * <pre>
--- a/jdk/src/java.base/share/classes/java/time/package-info.java	Thu May 28 10:54:48 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/time/package-info.java	Thu May 28 17:37:33 2015 -0400
@@ -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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -120,9 +120,10 @@
  *
  * <h3>Duration and Period</h3>
  * <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.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>
  *
  * <h3>Additional value types</h3>