diff --git a/org.springframework.context/src/main/java/org/springframework/ui/format/jodatime/AbstractDateTimeAnnotationFormatterFactory.java b/org.springframework.context/src/main/java/org/springframework/ui/format/jodatime/AbstractDateTimeAnnotationFormatterFactory.java index d2805ab59d..363b343fe7 100644 --- a/org.springframework.context/src/main/java/org/springframework/ui/format/jodatime/AbstractDateTimeAnnotationFormatterFactory.java +++ b/org.springframework.context/src/main/java/org/springframework/ui/format/jodatime/AbstractDateTimeAnnotationFormatterFactory.java @@ -22,6 +22,7 @@ import java.util.Date; import java.util.HashSet; import java.util.Set; +import org.joda.time.DateMidnight; import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.joda.time.LocalDateTime; @@ -80,11 +81,12 @@ abstract class AbstractDateTimeAnnotationFormatterFactory // internal helpers private Set> createFieldTypes() { - Set> fieldTypes = new HashSet>(7); + Set> fieldTypes = new HashSet>(8); fieldTypes.add(LocalDate.class); fieldTypes.add(LocalTime.class); fieldTypes.add(LocalDateTime.class); fieldTypes.add(DateTime.class); + fieldTypes.add(DateMidnight.class); fieldTypes.add(Date.class); fieldTypes.add(Calendar.class); fieldTypes.add(Long.class);