mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
da4e37dc1d
Prior to this commit, MergedAnnotationCollectors.toAnnotationSet() created an intermediate ArrayList for storing the results prior to creating a LinkedHashSet in the finishing step. Since the creation of the intermediate list is unnecessary, this commit simplifies the implementation of toAnnotationSet() by using the Collector.of() factory method that does not accept a `finisher` argument. The resulting Collector internally uses a `castingIdentity()` function as the `finisher`. Closes gh-26031