You probably want to call: binder.requireExplicitBindings() in your Guice Module to catch these kinds of errors earlier than later.
There are other methods that might solve your needs (like requireAtInjectOnConstructors), see: http://google.github.io/guice/api-docs/latest/javadoc/index.html?com/google/inject/Binder.html On Mon, Apr 6, 2015 at 3:16 PM Kevin Burton <[email protected]> wrote: > I just ran into this today and think it might be a bug? > > I have a Provider<Foo> which kind of implies that it would be explicitly > setup in a binding. > > But it looks like the default constructor was being called. > > This was giving me an non-started ActiveMQ broker which wasn't working. > > Doesn't Provider sort of imply that it's going to be explicitly provided? > Doing this implicitly seems like it's just prone to bugs. > > I prefer Guice to fail fast ...is there a way do disable some of this? > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-guice. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-guice/5a00ad7b-a9d0-4f70-bf5d-5b7ff5d92b73%40googlegroups.com > <https://groups.google.com/d/msgid/google-guice/5a00ad7b-a9d0-4f70-bf5d-5b7ff5d92b73%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAHNex9_Q3WNA6S7s6fkrJzFur5w1-X5avsn5DUpuTr%3Drjr3iUA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
