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 
<https://code.google.com/p/google-gimlet/issues/detail?id=4>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.



-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/K1yf0UrPNuYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to