From bc4d52a7e3067641b71fcfd79795fda8c7b12650 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Thu, 5 Nov 2009 05:24:50 +0000 Subject: [PATCH] added date midnight --- .../jodatime/AbstractDateTimeAnnotationFormatterFactory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);