Introduce support to pass-thru TemporalAccessor auditing values.
We now allow passing-thru TemporalAccessor auditing values, bypassing conversion if the target value type matches the value provided from e.g. DateTimeProvider. Refined the error messages and listing all commonly supported types for which we provide converters. Closes #2719 Original pull request #2874
This commit is contained in:
committed by
Jens Schauder
parent
f2387f687a
commit
d0ba125268
@@ -30,6 +30,7 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -82,10 +83,17 @@ public abstract class Jsr310Converters {
|
||||
}
|
||||
|
||||
public static boolean supports(Class<?> type) {
|
||||
|
||||
return CLASSES.contains(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the collection of supported temporal classes.
|
||||
* @since 3.2
|
||||
*/
|
||||
public static Collection<Class<?>> getSupportedClasses() {
|
||||
return Collections.unmodifiableList(CLASSES);
|
||||
}
|
||||
|
||||
@ReadingConverter
|
||||
public enum DateToLocalDateTimeConverter implements Converter<Date, LocalDateTime> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user