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

Matej Knopp resolved WICKET-668.
--------------------------------

    Resolution: Fixed

I removed the lazy initialization of the setter method - I don't see any reason 
for it.

> PropertyResolver.getPropertySetter() depends on calling 
> PropertyResolver.setValue() first for it to work.
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-668
>                 URL: https://issues.apache.org/jira/browse/WICKET-668
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Alastair Maw
>             Fix For: 1.3.0-beta3
>
>
> See PropertyResolverTest#testGetTargetSetter() for details.
> We go like this:
> Method method = PropertyResolver.getPropertySetter("number", address);
> assertEquals(method.getName(), "setNumber");
> However, the method variable will be null unless someone has previously 
> called setValue() on that field.
> This is asking for hard-to-reproduce NPEs. ;-)
> I discovered this while refactoring PropertyResolver to make it clean up 
> properly when the application goes away. The tests are now cleaning up 
> properly on setUp()/tearDown(), so this came to light.

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