bineanzhou / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Providers are used before they are injected #174

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've checked in a testcase in ProviderInjectionTest.java to demonstrate
this problem.

The gist is that if I call bind(...).toProvider(myProvider), then Guice
will sometimes invoke myProvider.get() before myProvider has been injected. 

This only happens when the result of myProvider.get() is needed at injector
creation time.

Original issue reported on code.google.com by limpbizkit on 3 Jan 2008 at 5:18

GoogleCodeExporter commented 9 years ago
Fixed. 

Original comment by limpbizkit on 11 Mar 2008 at 3:47