mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
68934f1b79
Prior to this commit, the findAllLocalMergedAnnotations() method in AnnotationDescriptor altered between the use of TYPE_HIERARCHY and TYPE_HIERARCHY_AND_ENCLOSING_CLASSES for the SearchStrategy, depending on @NestedTestConfiguration semantics; however, when searching for "local" annotations, there is no need to search the enclosing class hierarchy since AnnotationDescriptor#next() handles that use case. This commit therefore switches to using only the TYPE_HIERARCHY strategy. This commit also discontinues the use of MergedAnnotationCollectors.toAnnotationSet() in order to avoid the unnecessary creation of a temporary List when collecting synthesized annotations in a LinkedHashSet. Closes gh-25985