Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.