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.

        Issue Links

          Activity

          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit ec1db0f3392b89af28c18889b11b76b43a4c768e in wicket's branch refs/heads/master from Martin Grigorov
          [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=ec1db0f ]

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

          Show
          jira-bot ASF subversion and git services added a comment - Commit ec1db0f3392b89af28c18889b11b76b43a4c768e in wicket's branch refs/heads/master from Martin Grigorov [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=ec1db0f ] WICKET-6104 Rework AjaxFallback** components to use java.util.Optional for their #onEvent methods
          Hide
          mgrigorov Martin Grigorov added a comment -

          TODO: add entry to the migration page!

          Show
          mgrigorov Martin Grigorov added a comment - TODO: add entry to the migration page!

            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:

                Development