From 2b89a2c7b06c135edb4e048d9fd58f89a9f6533e Mon Sep 17 00:00:00 2001 From: rriggs Date: Fri, 30 Jan 2015 16:13:57 -0500 Subject: [PATCH] 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 --- src/share/classes/java/time/format/DateTimeFormatter.java | 6 ++++-- src/share/classes/java/time/package-info.java | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/share/classes/java/time/format/DateTimeFormatter.java b/src/share/classes/java/time/format/DateTimeFormatter.java index ef9c4de23..7f0c8db1f 100644 --- a/src/share/classes/java/time/format/DateTimeFormatter.java +++ b/src/share/classes/java/time/format/DateTimeFormatter.java @@ -117,8 +117,9 @@ import java.util.Set; * {@code parse(CharSequence text, DateTimeFormatter formatter)}. *

For example: *

+ *  LocalDate date = LocalDate.now();
  *  String text = date.format(formatter);
- *  LocalDate date = LocalDate.parse(text, formatter);
+ *  LocalDate parsedDate = LocalDate.parse(text, formatter);
  * 
*

* In addition to the format, formatters can be created with desired Locale, @@ -265,9 +266,10 @@ import java.util.Set; *

* For example: *

+ *  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);
  * 
*

* All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The diff --git a/src/share/classes/java/time/package-info.java b/src/share/classes/java/time/package-info.java index 5bc428319..d74682080 100644 --- a/src/share/classes/java/time/package-info.java +++ b/src/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 @@ -65,7 +65,7 @@ * The main API for dates, times, instants, and durations. *

*

- * 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 de facto world * calendar following the proleptic Gregorian rules. @@ -247,8 +247,8 @@ * *

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