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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.0-M1
    • 8.0.0-M1
    • wicket
    • 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

              mgrigorov Martin Tzvetanov Grigorov
              mgrigorov Martin Tzvetanov Grigorov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: