Status: New
Owner: ----

New issue 658 by [email protected]: Make it clear how to do an optional Injector.getInstance
http://code.google.com/p/google-guice/issues/detail?id=658

In a Google project, I wanted to inject an instance optionally but could not use @Inject(optional = true) because of a binding annotation with a non-constant member, so I looked to Injector.getInstance. The proper way to do an optional Injector.getInstance is not obvious from the documentation. If catching the ConfigurationException (as Guice does internally at http://code.google.com/p/google-guice/source/browse/trunk/core/src/com/google/inject/spi/InjectionPoint.java#735) is the recommended way, that should be documented.

--
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.

Reply via email to