RoboGuice 3 skipping my classes when annotation db is disabled

81 views
Skip to first unread message

Craig McIlwee

unread,
Oct 29, 2014, 4:56:42 PM10/29/14
to robo...@googlegroups.com
I've just switched over to RoboGuice 3 this week and am having some trouble with it skipping over my classes that require injection.  I've found the annotation processor to be unreliable when developing in eclipse (content of the generated fillClassesContainingInjectionPointSet method doesn't always have all the the classes that it should), so I want use the following line in my applications's onCreate() method to disable the annotation database when running debug builds and only use it in the release package

RoboGuice.setUseAnnotationDatabases(!BuildConfig.DEBUG);

But now the RoboGuiceHierarchyTraversalFilter doesn't like my classes.  It appears to be related to the reset() method not always being called when it should.  In the InjectionPoint class I see the filter being reset prior to use in the getInjectionPoints method but not in the forConstructorOf method.  It appears that a bunch of RoboGuice classes are created first and the filter is properly reset for each, but then when it comes to my classes they get skipped because the filter hasn't been reset.  I don't think I'm doing anything wrong (cause everything works when the annotation processor cooperates or if I use the RoboGuice.overrideApplicationInjector method) but it anyone has any suggestions that would be great.  I can provide more code or info if necessary.

Here's a screenshot that shows the stack, the raw type for my class that needs injection, and the isInRoboGuicePackage set to the wrong value.


Craig McIlwee

unread,
Nov 7, 2014, 4:03:54 PM11/7/14
to robo...@googlegroups.com
Looks like a constructor injection issue, filed here.
Reply all
Reply to author
Forward
0 new messages