-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid synthesizing annotations unnecessarily
Commit 31fa156 introduced initial support for avoiding unnecessary annotation synthesis in the MergedAnnotation API; however, it only avoided synthesis for annotations that do not declare any attributes. This commit reworks this support to avoid unnecessary annotation synthesis for annotations that declare attributes. Specifically, this commit introduces a new `isSynthesizable()` method in AnnotationTypeMapping that allows the "synthesizable" flag to be computed once and cached along with the other metadata already cached in AnnotationTypeMapping instances. TypeMappedAnnotation now delegates to this new method when determining whether it should synthesize an annotation. Closes gh-24861
- Loading branch information
Showing
4 changed files
with
104 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
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
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
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