You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.
I have an inner class (enum actually), and depending on how the ModuleAdapter is generated, I get different results. The @Provides is in a separate project from the @Inject point. I all cases, I'm using dagger 1.2.2.
In the following example, Led is an inner enum of SystemLeds.
Note the difference in the . vs $ in the qualification of the inner class.
This, of course, leads to java.lang.IllegalStateException: Errors creating object graph: & ca.nanometrics.apollo.helios.system.leds.util.SystemLeds.Led[] required by class ca.nanometrics.apollo.helios.debug.HeliosDebugModule
I can't quite pin down exactly what's going on, but I suspect it may be caused by the code generation sometimes happening from the mvn command line (with a JDK 8 -> target Java 7) and running within m2e which delegates to the maven-processor-plugin. This may be using JDK 7. So perhaps this is a discrepancy in the JavaWriter between Java7 and Java8, even though the target is always Java7. In any case, I would expect the strings generated for the Inject<->Provides mapping to always match.
I assume this would not be an issue in Dagger 2, since the map-style interface will be gone?
The text was updated successfully, but these errors were encountered:
I have an inner class (enum actually), and depending on how the ModuleAdapter is generated, I get different results. The
@Provides
is in a separate project from the@Inject
point. I all cases, I'm using dagger 1.2.2.In the following example,
Led
is an inner enum ofSystemLeds
.From the requirement side:
and in the provides side I have:
Note the difference in the
.
vs$
in the qualification of the inner class.This, of course, leads to
java.lang.IllegalStateException: Errors creating object graph: & ca.nanometrics.apollo.helios.system.leds.util.SystemLeds.Led[] required by class ca.nanometrics.apollo.helios.debug.HeliosDebugModule
I can't quite pin down exactly what's going on, but I suspect it may be caused by the code generation sometimes happening from the mvn command line (with a JDK 8 -> target Java 7) and running within m2e which delegates to the maven-processor-plugin. This may be using JDK 7. So perhaps this is a discrepancy in the JavaWriter between Java7 and Java8, even though the target is always Java7. In any case, I would expect the strings generated for the Inject<->Provides mapping to always match.
I assume this would not be an issue in Dagger 2, since the map-style interface will be gone?
The text was updated successfully, but these errors were encountered: