forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ArC: filter out class-retained or missing annotations
Sometimes, ArC used to call the `AnnotationLiteralProcessor` with annotations that are either class-retained, or their classes are missing (which is perfectly legal). It is a minority of callers though -- most of them only call `AnnotationLiteralProcessor` with qualifiers or interceptor bindings. Those must always be runtime-retained and their classes must be present, and it is an error if they are not. At the same time, we don't want to generate annotation literals for class-retained annotations or for annotations whose classes are missing. The `AnnotationLiteralProcessor` already checks that the annotation class exists, so with this commit, it also checks that the annotation for which the literal is generated is runtime-retained. If not, an exception is thrown. This lets us know that there's a problem somewhere. There are 2 places where ArC deals with arbitrary annotations and may need to generate annotation literals for them; in both cases, the code has to process all annotations present on an injection point. In these cases, it is straightforward to filter out class-retained annotations and missing annotation classes.
- Loading branch information
Showing
5 changed files
with
83 additions
and
5 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
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