spring-data-commons icon indicating copy to clipboard operation
spring-data-commons copied to clipboard

CustomConversion no longer allows for GenericConverter without specifying ConvertibleTypes [DATACMNS-1830]

Open spring-projects-issues opened this issue 5 years ago • 2 comments

Łukasz Świątek opened DATACMNS-1830 and commented

Changes to constructor in CustomConversions, made it impossible to register GenericConverter which does not specify ConvertibleTypes. Such converters will be filtered out.

 

 


No further details from DATACMNS-1830

spring-projects-issues avatar Nov 09 '20 11:11 spring-projects-issues

Mark Paluch commented

Care to elaborate on your use-case? What change in CustomConversions do you mean, we didn't change/remove any constructors in the past releases

spring-projects-issues avatar Nov 09 '20 15:11 spring-projects-issues

Łukasz Świątek commented

change https://github.com/spring-projects/spring-data-commons/commit/dbcf9aefff1be9da4168bdd479473322133f0130?branch=dbcf9aefff1be9da4168bdd479473322133f0130&diff=unified it used to assign converters as a collection of all passed converters, now it will filter converters before they are assigned (and collectPotentialConverterRegistrations excludes GenericConverters which do not have ConvertibleTypes)

 

use case :  json converter ( model classes to json, json to model classes)

this converter could probably work with Convertible types (Object, String) but i didn't get to test it yet,

spring-projects-issues avatar Nov 10 '20 17:11 spring-projects-issues