Comment #3 on issue 388 by [email protected]: Scopes.isSingleton
http://code.google.com/p/google-guice/issues/detail?id=388
I noticed that Scopes.isSingleton returns false for exposed bindings that
are in fact
singleton. I don't imagine this is the desired result.
Adding this lines in Scopes#isSingleton solved the problem for me
public static boolean isSingleton(Binding<?> binding) {
// handle exposed bindings differently
if (binding instanceof ExposedBinding) {
ExposedBinding exposed = (ExposedBinding) binding;
// we are guaranteed to get the child injector and a non-exposed binding
return
isSingleton(exposed.getPrivateElements().getInjector().getBinding(binding.getKey()));
}
....
}
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---