Thread-safe java.text.SimpleDateFormat format and parse

Martin Desruisseaux martin.desruisseaux at
Wed Jul 1 18:11:02 UTC 2015

Le 01/07/15 19:19, Remi Forax a écrit :
> I think we should go a step further and deprecate SimpleDateFormat and
> java.util.Date,
> it will save time for everyone (once everyone will have migrated ... ).

But I think that a replacement in the java.text package would be useful.
It could be for example a new DateFormat subclass that delegates most of
its work to java.time. The java.text package is still useful for
localizations mixing numbers, dates and other objects for which we have
a Format subclass (e.g. MessageFormat, but not only). I'm not aware of
other classes in the JDK that can replace java.text as a framework for
localization of arbitrary (provided a Format subclass exists) objects.


More information about the jdk9-dev mailing list