From 6c70d53d169be5f6205a633d704a54d69568e8b2 Mon Sep 17 00:00:00 2001 From: Roger Riggs Date: Thu, 28 May 2015 17:37:33 -0400 Subject: [PATCH] 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 --- .../classes/java/time/chrono/HijrahChronology.java | 10 ++++++++++ .../classes/java/time/format/DateTimeFormatter.java | 6 +++--- .../share/classes/java/time/package-info.java | 7 ++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java index 3dbbec5c0a4..ebe4e8a29d4 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java @@ -490,6 +490,16 @@ public final class HijrahChronology extends AbstractChronology implements Serial 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) { diff --git a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java index 4a5a53cd83c..32e17093c68 100644 --- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java +++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java @@ -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 @@ public final class DateTimeFormatter { * 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: *
diff --git a/jdk/src/java.base/share/classes/java/time/package-info.java b/jdk/src/java.base/share/classes/java/time/package-info.java
index cea222126f1..f078a08306d 100644
--- a/jdk/src/java.base/share/classes/java/time/package-info.java
+++ b/jdk/src/java.base/share/classes/java/time/package-info.java
@@ -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 @@
  *
  * 

Duration and Period

*

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

* *

Additional value types