Hello,this pr may solve this https://github.com/spring-projects/spring-framework/issues/28025 if I misundertand it please tell me, thank you! why use Collectors can easily confuse the compiler

Comment From: snicoll

@xixingya thank you for the PR but that doesn't address #28025. What we're trying to do there is en equivalent of List.of() (or Set.of()) where we could provide the collection implementation that we want to use, potentially reusing the existing algorithm to find out the closest one based on an existing instance.