spring-projects / spring-data-commons

Spring Data Commons. Interfaces and code shared between the various datastore specific implementations.
https://spring.io/projects/spring-data
Apache License 2.0
773 stars 673 forks source link

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

Open spring-projects-issues opened 3 years ago

spring-projects-issues commented 3 years ago

Ł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 commented 3 years ago

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 commented 3 years ago

Ł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,