You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2016/07/28 15:44:41 UTC

JDK9 DateFormat changes

Hi all

with JDK9 switching to the "CLDR" locale provider by default[1] the
format of DateFormat.SHORT has changed - which causes <touch> to use a
different default pattern when run on JDK9.

I've opened https://bz.apache.org/bugzilla/show_bug.cgi?id=59909 for
this, but after reading touch's manual page again I'm not sure "document
the default pattern depends on the version of Java" is a good idea
anymore.

The text for the pattern attribute says "Defaults to MM/DD/YYYY HH:MM
AM_or_PM or MM/DD/YYYY HH:MM:SS AM_or_PM" - which indicates we should be
using a (thread-local) SimpleDateFormat rather than rely on the standard
patterns.

What do you think?

     Stefan

[1] http://openjdk.java.net/jeps/252

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: JDK9 DateFormat changes

Posted by Dominique Devienne <dd...@gmail.com>.
On Thu, Jul 28, 2016 at 5:44 PM, Stefan Bodewig <bo...@apache.org> wrote:

> The text for the pattern attribute says "Defaults to MM/DD/YYYY HH:MM
> AM_or_PM or MM/DD/YYYY HH:MM:SS AM_or_PM" - which indicates we should be
> using a (thread-local) SimpleDateFormat rather than rely on the
> standard patterns.


Hi Stefan. I agree, we should retain BC if possible, despite Java9's
efforts to break it. --DD

PS: I've been lurking in the recent JIRA activity regarding this, thank you
for your efforts.
PPS: How to retain BC (thread-local or not), I'll leave it to you and
others :)