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

MarkupContainer's add(final Component child) does not initially check for a child null reference

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.5
    • 1.3.6, 1.4-RC2
    • wicket
    • None

    Description

      More specifically, the MarkupContainer's add(final Component child) calls checkHierarchyChange() before determining if the child reference is null. IMHO this should be ideally be called after checking if the child reference is null. From a user perspective, throwing an IllegalArgumentException with a message telling them that they have passed a null referenced component has better affordance then an esoteric NNE on calling checkHierarchyChange.

      Attachments

        1. WICKET-1984.patch
          0.8 kB
          James Perry

        Activity

          People

            ivaynberg Igor Vaynberg
            msc65jap James Perry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: