A DESCRIPTION OF THE PROBLEM :
java.text.MessageFormat
the method: MessageFormat.format
see line 1272
private StringBuffer subformat
....
} else if (obj instanceof Number) {
// format number if can
subFormatter = NumberFormat.getInstance(locale);
} else if (obj instanceof Date) {
// format a Date if can
subFormatter = DateFormat.getDateTimeInstance(
DateFormat.SHORT, DateFormat.SHORT, locale);//fix
} else if (obj instanceof String) {
arg = (String) obj;
}
...
can't work with java.time.LocalDate and java.time.LocalDateTime
only with old java.util.Date
FREQUENCY : always
java.text.MessageFormat
the method: MessageFormat.format
see line 1272
private StringBuffer subformat
....
} else if (obj instanceof Number) {
// format number if can
subFormatter = NumberFormat.getInstance(locale);
} else if (obj instanceof Date) {
// format a Date if can
subFormatter = DateFormat.getDateTimeInstance(
DateFormat.SHORT, DateFormat.SHORT, locale);//fix
} else if (obj instanceof String) {
arg = (String) obj;
}
...
can't work with java.time.LocalDate and java.time.LocalDateTime
only with old java.util.Date
FREQUENCY : always
- duplicates
-
JDK-8318761 MessageFormat pattern support for CompactNumberFormat, ListFormat, and DateTimeFormatter
-
- Resolved
-