Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8261728: SimpleDateFormat should link to DateTimeFormatter #2616

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/java.base/share/classes/java/text/DateFormat.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -146,7 +146,8 @@
* Date formats are not synchronized.
* It is recommended to create separate format instances for each thread.
* If multiple threads access a format concurrently, it must be synchronized
* externally.
* externally. Consider using {@link java.time.format.DateTimeFormatter} as an
* immutable and thread-safe alternative.
*
* @implSpec
* <ul><li>The {@link #format(Date, StringBuffer, FieldPosition)} and
Expand All @@ -173,6 +174,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
*/
Expand Down
6 changes: 4 additions & 2 deletions src/java.base/share/classes/java/text/SimpleDateFormat.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -427,13 +427,15 @@
* Date formats are not synchronized.
* It is recommended to create separate format instances for each thread.
* If multiple threads access a format concurrently, it must be synchronized
* externally.
* externally. 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
*/
Expand Down