xiaodududu / google-guice

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

Cannot use optimized @Assisted provider outside the scope of the constructor. #594

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using Guice-rc2 and I found this error using Assisted Inject... but the 
strange thing is that only happens when I bootstrap the injector with 
Stage.PRODUCTION

Please find attached a little mvn project, where you can reproduce the 
exception. 

There's one test runned by a custom JUnit runner, so I'm able to inject tests. 
There you'll find the injector and how it's configured. I couldn't figure out 
an scale-down version of this project, I've just removed real implementations.

hth, 
jordi

Original issue reported on code.google.com by jordi.giro9 on 27 Jan 2011 at 7:53

Attachments:

GoogleCodeExporter commented 9 years ago
here's the correct file

Original comment by jordi.giro9 on 27 Jan 2011 at 7:55

Attachments:

GoogleCodeExporter commented 9 years ago
fixed in r1483.  thanks for reporting the problem!  you can workaround it for 
now by removing the @Singleton annotation from your assisted implementation 
classes.

Original comment by sberlin on 29 Jan 2011 at 8:46