forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lazily match fields to their Kotlin property metadata.
Dagger matches fields with Kotlin property metadata to generate code that uses property getter methods and/or retrieve qualifier annotations. This CL makes it so that the matching is done lazily and only on fields Dagger is interested on (annotated with @Inject, @BindValue, etc) instead of attempting to match all fields of the TypeElement being processed. This makes it so that the strict requirement of a fields having property metadata is only enforced on relevant fields and other fields, such as those generated by compiler extensions and without metadata get ignored. Fixes: #2190 RELNOTES=Fix a bug where Dagger was unnecessarily inspecting all fields of a class and attempting to find their Kotlin metadata, failing to do so sometimes and crashing the processor. PiperOrigin-RevId: 343914341
- Loading branch information
1 parent
e0d9ef2
commit a885c85
Showing
1 changed file
with
41 additions
and
66 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