Open GoogleCodeExporter opened 9 years ago
Alright, I figured out a workaround: one must bind the class into which the
child injector is going to be
injected explicitly in he child injector's bindings. For my previous example,
this would mean something like
this: bind(A.class);
Nevertheless, I consider the current behavior a bug.
Original comment by an.pere...@googlemail.com
on 15 Apr 2010 at 11:04
This is because if the binding does not exist in the child injector's module,
Guice
will create it as a "just in time" binding, and JIT bindings are created in the
parent modules (for a variety of reasons).
Original comment by sberlin
on 15 Apr 2010 at 12:53
Original comment by sberlin
on 25 Apr 2010 at 10:17
Original issue reported on code.google.com by
an.pere...@googlemail.com
on 15 Apr 2010 at 10:54Attachments: