Deprecate R2dbcConverters.getOverrideConvertersToRegister() and its converters.
…OverrideConverters are no longer required as converters are filtered using ConverterConfiguration. Closes #750
This commit is contained in:
@@ -77,7 +77,10 @@ abstract class R2dbcConverters {
|
||||
* @return A list of the registered converters to enforce JSR-310 type usage.
|
||||
* @see CustomConversions#DEFAULT_CONVERTERS
|
||||
* @see Jsr310Converters
|
||||
* @deprecated since 1.5, no longer required due to {@code ConverterConfiguration} converter filtering. Will be
|
||||
* removed with the next major release.
|
||||
*/
|
||||
@Deprecated
|
||||
public static Collection<Object> getOverrideConvertersToRegister() {
|
||||
|
||||
List<Object> converters = new ArrayList<>();
|
||||
@@ -256,8 +259,11 @@ abstract class R2dbcConverters {
|
||||
* {@link Converter} override that forces {@link LocalDate} to stay on {@link LocalDate}.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @deprecated since 1.5, no longer required due to {@code ConverterConfiguration} converter filtering. Will be
|
||||
* removed with the next major release.
|
||||
*/
|
||||
@WritingConverter
|
||||
@Deprecated
|
||||
public enum LocalDateConverterOverride implements Converter<LocalDate, LocalDate> {
|
||||
|
||||
INSTANCE;
|
||||
@@ -272,8 +278,11 @@ abstract class R2dbcConverters {
|
||||
* {@link Converter} override that forces {@link LocalDateTime} to stay on {@link LocalDateTime}.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @deprecated since 1.5, no longer required due to {@code ConverterConfiguration} converter filtering. Will be
|
||||
* removed with the next major release.
|
||||
*/
|
||||
@WritingConverter
|
||||
@Deprecated
|
||||
public enum LocalDateTimeConverterOverride implements Converter<LocalDateTime, LocalDateTime> {
|
||||
|
||||
INSTANCE;
|
||||
@@ -288,8 +297,11 @@ abstract class R2dbcConverters {
|
||||
* {@link Converter} override that forces {@link LocalTime} to stay on {@link LocalTime}.
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @deprecated since 1.5, no longer required due to {@code ConverterConfiguration} converter filtering. Will be
|
||||
* removed with the next major release.
|
||||
*/
|
||||
@WritingConverter
|
||||
@Deprecated
|
||||
public enum LocalTimeConverterOverride implements Converter<LocalTime, LocalTime> {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class R2dbcCustomConversions extends CustomConversions {
|
||||
*/
|
||||
@Deprecated
|
||||
public R2dbcCustomConversions(Collection<?> converters) {
|
||||
super(new R2dbcCustomConversionsConfiguration(STORE_CONVERSIONS, appendOverrides(converters)));
|
||||
super(new R2dbcCustomConversionsConfiguration(STORE_CONVERSIONS, new ArrayList<>(converters)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,7 +57,7 @@ public class R2dbcCustomConversions extends CustomConversions {
|
||||
* @param converters must not be {@literal null}.
|
||||
*/
|
||||
public R2dbcCustomConversions(StoreConversions storeConversions, Collection<?> converters) {
|
||||
super(new R2dbcCustomConversionsConfiguration(storeConversions, appendOverrides(converters)));
|
||||
super(new R2dbcCustomConversionsConfiguration(storeConversions, new ArrayList<>(converters)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,14 +88,6 @@ public class R2dbcCustomConversions extends CustomConversions {
|
||||
return new R2dbcCustomConversions(StoreConversions.of(dialect.getSimpleTypeHolder(), storeConverters), converters);
|
||||
}
|
||||
|
||||
private static List<?> appendOverrides(Collection<?> converters) {
|
||||
|
||||
List<Object> objects = new ArrayList<>(converters);
|
||||
objects.addAll(R2dbcConverters.getOverrideConvertersToRegister());
|
||||
|
||||
return objects;
|
||||
}
|
||||
|
||||
static class R2dbcCustomConversionsConfiguration extends ConverterConfiguration {
|
||||
|
||||
public R2dbcCustomConversionsConfiguration(StoreConversions storeConversions, List<?> userConverters) {
|
||||
|
||||
Reference in New Issue
Block a user