private void assertValidDateFieldType ( Optional < Field > field ) { field . ifPresent ( it -> { if ( SUPPORTED_DATE_TYPES . contains ( it . getType ( ) . getName ( ) ) ) { return ; } Class < ? > type = it . getType ( ) ; if ( Jsr310Converters . supports ( type ) || ThreeTenBackPortConverters . supports ( type ) ) { return ; } throw new IllegalStateException ( String . format ( "Found created/modified date field with type %s but only %s as well as java.time types are supported!" , type , SUPPORTED_DATE_TYPES ) ) ; } ) ; }
Checks whether the given field has a type that is a supported date type .