mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8336300: DateFormatSymbols#getInstanceRef returns non-cached instance
Reviewed-by: joehw, iris, jlu, aturbanov
This commit is contained in:
parent
7ec55df34a
commit
10186ff48f
2 changed files with 3 additions and 17 deletions
|
@ -623,7 +623,7 @@ public class SimpleDateFormat extends DateFormat {
|
|||
|
||||
initializeCalendar(locale);
|
||||
this.pattern = pattern;
|
||||
this.formatData = DateFormatSymbols.getInstanceRef(locale);
|
||||
formatData = DateFormatSymbols.getInstance(locale);
|
||||
this.locale = locale;
|
||||
initialize(locale);
|
||||
}
|
||||
|
@ -644,7 +644,7 @@ public class SimpleDateFormat extends DateFormat {
|
|||
}
|
||||
|
||||
this.pattern = pattern;
|
||||
this.formatData = (DateFormatSymbols) formatSymbols.clone();
|
||||
formatData = (DateFormatSymbols) formatSymbols.clone();
|
||||
this.locale = Locale.getDefault(Locale.Category.FORMAT);
|
||||
initializeCalendar(this.locale);
|
||||
initialize(this.locale);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue