DATACOUCH-304 - Remove support for JodaTime's deprecated DateMidnight.
Related ticket: DATACMNS-1014.
This commit is contained in:
@@ -25,7 +25,6 @@ import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.joda.time.DateMidnight;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.LocalDateTime;
|
||||
@@ -40,6 +39,7 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* @author Michael Nitschinger
|
||||
* @author Subhashni Balakrishnan
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public final class DateConverters {
|
||||
|
||||
@@ -74,11 +74,9 @@ public final class DateConverters {
|
||||
converters.add(LocalDateToLongConverter.INSTANCE);
|
||||
converters.add(LocalDateTimeToLongConverter.INSTANCE);
|
||||
converters.add(DateTimeToLongConverter.INSTANCE);
|
||||
converters.add(DateMidnightToLongConverter.INSTANCE);
|
||||
converters.add(NumberToLocalDateConverter.INSTANCE);
|
||||
converters.add(NumberToLocalDateTimeConverter.INSTANCE);
|
||||
converters.add(NumberToDateTimeConverter.INSTANCE);
|
||||
converters.add(NumberToDateMidnightConverter.INSTANCE);
|
||||
}
|
||||
|
||||
return converters;
|
||||
@@ -182,16 +180,6 @@ public final class DateConverters {
|
||||
}
|
||||
}
|
||||
|
||||
@WritingConverter
|
||||
public enum DateMidnightToLongConverter implements Converter<DateMidnight, Long> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public Long convert(DateMidnight source) {
|
||||
return source == null ? null : source.toDate().getTime();
|
||||
}
|
||||
}
|
||||
|
||||
@ReadingConverter
|
||||
public enum NumberToLocalDateConverter implements Converter<Number, LocalDate> {
|
||||
INSTANCE;
|
||||
@@ -222,14 +210,4 @@ public final class DateConverters {
|
||||
}
|
||||
}
|
||||
|
||||
@ReadingConverter
|
||||
public enum NumberToDateMidnightConverter implements Converter<Number, DateMidnight> {
|
||||
INSTANCE;
|
||||
|
||||
@Override
|
||||
public DateMidnight convert(Number source) {
|
||||
return source == null ? null : new DateMidnight(source.longValue());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user