You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alastair Maw (JIRA)" <ji...@apache.org> on 2007/06/18 21:01:41 UTC
[jira] Created: (WICKET-668) PropertyResolver.getPropertySetter()
depends on calling PropertyResolver.setValue() first for it to work.
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.
[jira] Resolved: (WICKET-668) PropertyResolver.getPropertySetter()
depends on calling PropertyResolver.setValue() first for it to work.
Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
[ 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.