Binder.skipSources isn't working for me in a particular class with generic parameters, but does work correctly in an unrelated non-generic class. Is this possibly a known bug or limitation to skipSources?
Here are more details if relevant. The
issue is from Google Gimlet.
For some inexplicable reason, Guice still reports binding errors inside LegBinder.bindTo().
I
am puzzled as to why this occurs, since I verified correct behavior
with the skipSources() method in my own binding utility classes.
When you have a binding problem, presently LMB lets Guice report the error at the line inside LMB instead of the line in the LMB client code. The following change to LMB will fix this:
In LegBinder.java, bindTo() method, change this line:
Binder binder = binder();
to:
Binder binder = binder().skipSources(LegBinder.class, LegModuleBuilder.class, Foot.class, KeyOrInstanceUnionWithLabel.class);
See Docs on Binder.skipSources() for details.