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

Igor Vaynberg resolved WICKET-904.
----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg

i dont think we can do this. (a) factory beans are not limited to singletons 
and (b) wicket lookups are lazy - so at injection time we do not know the 
value, only when you call a method on that bean we perform the actual lookup.

for the very rare cases where you can have a factory bean return null you can 
use this to check the value:

@SpringBean MyObject object;
...

((ILazyInitProxy)object).getObjectLocator().locateProxyTarget()==null

> AnnotProxyFieldValueFactory creates proxies for FactoryBeans that return null
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-904
>                 URL: https://issues.apache.org/jira/browse/WICKET-904
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-spring
>    Affects Versions: 1.3.0-beta3
>            Reporter: Marat Radchenko
>            Assignee: Igor Vaynberg
>            Priority: Critical
>
> subj.
> Steps to reproduce:
> 1) Create FactoryBean that will return null.
> 2) Create wicket component with @SpringBean annotation.
> Expected:
> null is injected.
> Actual:
> CGLIB proxy with null target is injected.

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