Hilt rewrites methods to inject android components at a certain point (early) in their lifecycles, so premature access of @Inject properties will usually result in a kotlin.UninitializedPropertyAccessException or an NRE in Java. https://dagger.dev/hilt/components#component-lifetimes
For example, if a Fragment references an @Inject property in its initializer (or implicitly does so by using it to initialize another property), the app will crash.
We should detect premature use of @Inject properties. The detector should be compatible with Java and Kotlin.
Hilt rewrites methods to inject android components at a certain point (early) in their lifecycles, so premature access of @Inject properties will usually result in a
kotlin.UninitializedPropertyAccessExceptionor an NRE in Java. https://dagger.dev/hilt/components#component-lifetimesFor example, if a Fragment references an @Inject property in its initializer (or implicitly does so by using it to initialize another property), the app will crash.
We should detect premature use of
@Injectproperties. The detector should be compatible with Java and Kotlin.