-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not create intermediate list in MergedAnnotationCollectors.toAnnot…
…ationSet() 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
- Loading branch information
Showing
1 changed file
with
30 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters