You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/08/28 11:21:58 UTC

[jira] [Resolved] (WICKET-5686) @Inject should require the bean dependency instead of setting null

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

Martin Grigorov resolved WICKET-5686.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.17.0
                   7.0.0-M3

Changed to required for Spring.
Wicket-Guice already threatened it as required.
Added test cases for both.

> @Inject should require the bean dependency instead of setting null
> ------------------------------------------------------------------
>
>                 Key: WICKET-5686
>                 URL: https://issues.apache.org/jira/browse/WICKET-5686
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-spring
>    Affects Versions: 6.16.0
>         Environment: Spring 4.0.6
>            Reporter: Anton Kurniawan
>            Assignee: Martin Grigorov
>             Fix For: 7.0.0-M3, 6.17.0
>
>
> When using {{@SpringBean}}, if the bean cannot be injected then Wicket will throw {{Exception}}.
> However current behavior if when using {{@Inject}} inside component, the field will be left as null. This is inconsistent behavior with what CDI spec and how the "real" Spring does it.
> Wicket should change its behavior so that {{@Inject}} is always required. If the dependency is optional the user can use {{@SpringBean(required=false)}} as always.



--
This message was sent by Atlassian JIRA
(v6.2#6252)