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

Rework AjaxFallback** components to use java.util.Optional for their #onEvent methods

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.0.0-M1
    • Fix Version/s: 8.0.0-M1
    • Component/s: wicket
    • Labels:
      None

      Description

      At the moment Wicket's passes "null" as a AjaxRequestTarget when an AjaxFallback** component is used in a browser with disabled JavaScript.
      Sometimes application developers forget to check the passed "target" for null and try to use and this leads to NullPointerException at runtime.

      It would be better to make use of Java 8's java.util.Optional. This way the application developer cannot forget the check.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mgrigorov Martin Grigorov
                Reporter:
                mgrigorov Martin Grigorov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: