How do you run the example where the NPE occurs?
Guice can only inject instances which are created by Guice or are passed to 
the method injector.injectMembers().

I highly recommend to use constructor injection over field or method 
injection.
Especially because it makes testing without Guice easier.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-guice+unsubscr...@googlegroups.com.
To post to this group, send email to google-guice@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/70b72ff8-612c-4e90-9b47-707717fea1fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to