-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
@ProvidedBy @Singleton doesn't work #251
Comments
From ori.schwartz on July 14, 2011 11:34:55 also for a simple junit test is attached. Attachment: gist |
From Ben.Manes on September 17, 2013 14:00:22 Any chance this is fixed in Guice 4.0? Just ran into this for a servlet filter. |
It is still not fixed. I think it is because |
isn't it an ordering thing? |
You're right, maybe we need a new provided class to deal with this situation 👍 |
No I mean there are two types are singletons, - |
When we use Am I understanding it correctly? And I also write more test cases: |
Solve issue google#251 and add corresponding test for it Need consider scope annotation in ProvidedBy handling
…ProvidedBy when using the @ProvidedBy as the provider. Notably, this does *not* change things to allow scoping annotations on interfaces or abstract classes (even though theoretically we could, because the @ProvidedBy will be instantiating it). Scopes on abstract classes|interfaces will still throw an exception about the scope being misplaced. Fixes #251 and fixes #1319. PiperOrigin-RevId: 525525327
From limpbizkit on September 26, 2008 13:12:47
It should provide a single instance.
The rules for
@
ProvidedBy and annotations don't need to be the same as for@
ImplementedBy, where scoping conflicts could be problematic. For@
ProvidedBy the scopes don't conflict.Original issue: http://code.google.com/p/google-guice/issues/detail?id=251
The text was updated successfully, but these errors were encountered: