You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2009/04/25 20:29:30 UTC

[jira] Resolved: (WICKET-2241) Guice integration doesn't honour optional bindings

     [ https://issues.apache.org/jira/browse/WICKET-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2241.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-RC3
         Assignee: Igor Vaynberg

> 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
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.4-RC3
>
>         Attachments: 0001-WICKET-2241-Support-for-Guice-s-Inject-optional.patch
>
>
> 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.