polish
This commit is contained in:
parent
6f4112af80
commit
835b958911
|
|
@ -22,6 +22,7 @@ import java.lang.annotation.Target;
|
|||
|
||||
/**
|
||||
* Declares that a field should be formatted as a ISO date time.
|
||||
* Can be applied to <code>java.util.Date</code>, <code>java.util.Calendar</code>, <code>java.long.Long</code>, or Joda Time fields.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ import org.springframework.format.annotation.ISODateTimeFormat.ISO;
|
|||
public final class ISODateTimeFormatAnnotationFormatterFactory extends AbstractDateTimeAnnotationFormatterFactory<ISODateTimeFormat> {
|
||||
|
||||
protected DateTimeFormatter configureDateTimeFormatterFrom(ISODateTimeFormat annotation) {
|
||||
ISO style = annotation.value();
|
||||
if (style == ISO.DATE) {
|
||||
ISO format = annotation.value();
|
||||
if (format == ISO.DATE) {
|
||||
return org.joda.time.format.ISODateTimeFormat.date();
|
||||
} else if (style == ISO.TIME) {
|
||||
} else if (format == ISO.TIME) {
|
||||
return org.joda.time.format.ISODateTimeFormat.time();
|
||||
} else {
|
||||
return org.joda.time.format.ISODateTimeFormat.dateTime();
|
||||
|
|
|
|||
Loading…
Reference in New Issue