Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-668

PropertyResolver.getPropertySetter() depends on calling PropertyResolver.setValue() first for it to work.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0-beta3
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            almaw Alastair Maw
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: