Guice integration doesn't honour optional bindings
--------------------------------------------------

                 Key: WICKET-2241
                 URL: https://issues.apache.org/jira/browse/WICKET-2241
             Project: Wicket
          Issue Type: Bug
          Components: wicket-guice
            Reporter: Jesse Wilson
            Priority: Minor


When @Inject(optional=true) is applied and the binding isn't available, wicket 
should skip the injection silently.
http://groups.google.com/group/google-guice/browse_thread/thread/2abe9b55ee26a198

To check whether the binding is available, you need to use a try/catch block:
  try {
    Binding binding = injector.getBinding(key);
    // use the binding
  } catch (ConfigurationException e) {
    // the binding isn't available
  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to