Affects: 5.2.10.RELEASE
Maybe I'm missing something, but I think the JavaDoc on the @DateTimeFormat is out of date / not correct.
The DateTimeFormat.ISO#DATE_TIME JavaDoc states, that the DATE_TIME is the default used, when no iso value is specified:
/**
* The most common ISO DateTime Format {@code yyyy-MM-dd'T'HH:mm:ss.SSSXXX},
* e.g. "2000-10-31T01:30:00.000-05:00".
* <p>This is the default if no annotation value is specified.
*/
DATE_TIME
However, when looking at the DateTimeFormat#iso() implementation, it's as follows:
/**
* The ISO pattern to use to format the field.
* <p>The possible ISO patterns are defined in the {@link ISO} enum.
* <p>Defaults to {@link ISO#NONE}, indicating this attribute should be ignored.
* Set this attribute when you wish to format your field in accordance with an ISO format.
*/
ISO iso() default ISO.NONE;
So there clearly is a mismatch. Is it just an outdated JavaDoc issue?
Comment From: jhoeller
Good catch, the actual default is dependent on the formatter backend (JSR-310 vs Joda-Time vs java.util.Date infrastructure), so that javadoc comment on the DATE_TIME
constant is misleading; I'll remove it right away.