Skip to content
Permalink
Browse files
8261728: SimpleDateFormat should link to DateTimeFormatter
Reviewed-by: bpb, rriggs, lancea, iris
  • Loading branch information
naotoj committed Feb 19, 2021
1 parent 851b2e3 commit 8a1c712c2ed54fbd3eea14a6ee6fff24e9275812
Showing with 8 additions and 2 deletions.
  1. +4 −1 src/java.base/share/classes/java/text/DateFormat.java
  2. +4 −1 src/java.base/share/classes/java/text/SimpleDateFormat.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2021, 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
@@ -147,6 +147,8 @@
* It is recommended to create separate format instances for each thread.
* If multiple threads access a format concurrently, it must be synchronized
* externally.
* @apiNote Consider using {@link java.time.format.DateTimeFormatter} as an
* immutable and thread-safe alternative.
*
* @implSpec
* <ul><li>The {@link #format(Date, StringBuffer, FieldPosition)} and
@@ -173,6 +175,7 @@
* @see java.util.Calendar
* @see java.util.GregorianCalendar
* @see java.util.TimeZone
* @see java.time.format.DateTimeFormatter
* @author Mark Davis, Chen-Lieh Huang, Alan Liu
* @since 1.1
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2021, 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
@@ -428,12 +428,15 @@
* It is recommended to create separate format instances for each thread.
* If multiple threads access a format concurrently, it must be synchronized
* externally.
* @apiNote Consider using {@link java.time.format.DateTimeFormatter} as an
* immutable and thread-safe alternative.
*
* @see <a href="http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html">Java Tutorial</a>
* @see java.util.Calendar
* @see java.util.TimeZone
* @see DateFormat
* @see DateFormatSymbols
* @see java.time.format.DateTimeFormatter
* @author Mark Davis, Chen-Lieh Huang, Alan Liu
* @since 1.1
*/

1 comment on commit 8a1c712

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 8a1c712 Feb 19, 2021

Please sign in to comment.