Whilst doing some testing that caused duplicate META-INF/spring.factories files on the classpath it became apparent that the Spring loading wasn't filtering out duplicates. There are some pieces of code (for example in Spring Data) that were checking 'how many implementations are there' to determine whether to switch to a multi-provider handler or not. In those cases the code was discovering there were two implementations but in fact they were the same thing (exact same name).
Comment From: sbrannen
Thanks for bringing this to our attention.
Making this change would align the semantics of SpringFactoriesLoader with those of java.util.ServiceLoader in this regard:
If a particular concrete provider class is named in more than one configuration file, or is named in the same configuration file more than once, then the duplicates are ignored.