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

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.5
    • Fix Version/s: 1.3.6, 1.4-RC2
    • Component/s: wicket
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: