-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 17, 21, 23
Javadoc of 'java.text.DateFormatSymbols#getInstanceRef' states that this method is supposed to return cached instance. Not clone, like its brother-method 'java.text.DateFormatSymbols#getInstance(java.util.Locale)'.
But it's the case anymore (after changes from JEP 127). Actual implementation of both methods is the same:
public static final DateFormatSymbols getInstance(Locale locale) {
DateFormatSymbols dfs = getProviderInstance(locale);
if (dfs != null) {
return dfs;
}
throw new RuntimeException("DateFormatSymbols instance creation failed.");
}
We should either remove redundant 'getInstanceRef' method and use 'getInstance' directly. Or fix implementation to return not-cloned instance.
But it's the case anymore (after changes from JEP 127). Actual implementation of both methods is the same:
public static final DateFormatSymbols getInstance(Locale locale) {
DateFormatSymbols dfs = getProviderInstance(locale);
if (dfs != null) {
return dfs;
}
throw new RuntimeException("DateFormatSymbols instance creation failed.");
}
We should either remove redundant 'getInstanceRef' method and use 'getInstance' directly. Or fix implementation to return not-cloned instance.
- relates to
-
JDK-8046117 JEP 127: Improve Locale Data Packaging and Adopt Unicode CLDR Data
-
- Closed
-
- links to
-
Commit(master) openjdk/jdk/10186ff4
-
Review(master) openjdk/jdk/20199