Mercurial > hg > openjdk > aarch64-port > jdk
changeset 10899:587ff69bdab2
8062803: 'principal' should be 'principle' in java.time package description
8062796: java.time.format.DateTimeFormatter error in API doc example
Reviewed-by: lancea, mchung, coffeys
author | rriggs |
---|---|
date | Fri, 30 Jan 2015 16:13:57 -0500 |
parents | d3df3d70e3d7 |
children | ebfc49ea7c5f |
files | src/share/classes/java/time/format/DateTimeFormatter.java src/share/classes/java/time/package-info.java |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/java/time/format/DateTimeFormatter.java Thu Mar 06 16:51:30 2014 +0000 +++ b/src/share/classes/java/time/format/DateTimeFormatter.java Fri Jan 30 16:13:57 2015 -0500 @@ -117,8 +117,9 @@ * {@code parse(CharSequence text, DateTimeFormatter formatter)}. * <p>For example: * <blockquote><pre> + * LocalDate date = LocalDate.now(); * String text = date.format(formatter); - * LocalDate date = LocalDate.parse(text, formatter); + * LocalDate parsedDate = LocalDate.parse(text, formatter); * </pre></blockquote> * <p> * In addition to the format, formatters can be created with desired Locale, @@ -265,9 +266,10 @@ * <p> * For example: * <blockquote><pre> + * LocalDate date = LocalDate.now(); * DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy MM dd"); * String text = date.format(formatter); - * LocalDate date = LocalDate.parse(text, formatter); + * LocalDate parsedDate = LocalDate.parse(text, formatter); * </pre></blockquote> * <p> * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The
--- a/src/share/classes/java/time/package-info.java Thu Mar 06 16:51:30 2014 +0000 +++ b/src/share/classes/java/time/package-info.java Fri Jan 30 16:13:57 2015 -0500 @@ -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 @@ -65,7 +65,7 @@ * The main API for dates, times, instants, and durations. * </p> * <p> - * The classes defined here represent the principal date-time concepts, + * The classes defined here represent the principle date-time concepts, * including instants, durations, dates, times, time-zones and periods. * They are based on the ISO calendar system, which is the <i>de facto</i> world * calendar following the proleptic Gregorian rules. @@ -247,8 +247,8 @@ * </ul> * <p> * Multiple calendar systems is an awkward addition to the design challenges. - * The first principal is that most users want the standard ISO calendar system. - * As such, the main classes are ISO-only. The second principal is that most of those that want a + * The first principle is that most users want the standard ISO calendar system. + * As such, the main classes are ISO-only. The second principle is that most of those that want a * non-ISO calendar system want it for user interaction, thus it is a UI localization issue. * As such, date and time objects should be held as ISO objects in the data model and persistent * storage, only being converted to and from a local calendar for display.