Related to https://github.com/spring-projects/spring-framework/issues/29411
Comment From: mdeinum
This is a breaking change as when a comma is detected it will now keep it as is with 1 comma and still parse it when there are more then 1.
Comment From: dmytro-zhelieznyi
Hello, thank you for pointing out the error. I have made changed, so now "comma" will not be detected as separator for creating array. In this case if @RequestParam receive string like this "?res=aaa,bbb,ccc" it will be consumed as single string and assigned as 1st element of collection. For separating parameters we should separate it in the following way "?res=aaa&res=bbb&res=ccc". In this case spring will use org.springframework.core.convert.support.ArrayToCollectionConverter.
Comment From: mdeinum
Which still is a breaking change especially with such a converter which is used in other places as well (like binding variables with @Value
) which would fail now as well.
Comment From: sbrannen
Hi @dmytro-zhelieznyi,
Thanks for submitting your first PR to the Spring Framework.
Unfortunately, as pointed out by @mdeinum, this constitutes a breaking change to the contract of StringToCollectionConverter
.
In light of that, I am closing this PR.