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

AbstractTree#updateBranch() and #updateNode() make AjaxRequestTarget mandatory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 8.0.0-M3
    • 8.0.0-M4
    • wicket-extensions
    • None

    Description

      With the new Optional<AjaxRequestTarget> spreading over Wickets code base, AbstractTree#updateBranch() and #updateNode() were changed (by me) to get an optional ART.

      Further examination shows, that this was a wrong decision:

      • most Java experts argue against optional method parameters
      • there are cases now where an existing ART must be wrapped in an optional just to pass it into the methods.

      The former solution to check the parameter against null isn't feasible now either, since you have to use optional#orElse(null) if you happen to have an Optional<ART> only.

      Thus it is better to just make the ART parameter mandatory.

      Attachments

        Activity

          People

            svenmeier Sven Meier
            svenmeier Sven Meier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: