[
https://issues.apache.org/jira/browse/WICKET-6324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940300#comment-15940300
]
Sven Meier commented on WICKET-6324:
------------------------------------
Thanks for asking:
The target cannot - nor should it - be null, at that moment. So Optional#of()
assures that this assumption holds.
> AjaxFallbackButton#onError parameter type should be
> Optional<AjaxRequestTarget>
> -------------------------------------------------------------------------------
>
> Key: WICKET-6324
> URL: https://issues.apache.org/jira/browse/WICKET-6324
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 8.0.0-M3
> Reporter: Andrew Geery
> Assignee: Sven Meier
> Priority: Minor
> Fix For: 8.0.0-M4
>
>
> The parameter for AjaxFallbackButton#onSubmit is Optional<AjaxRequestTarget>
> because the AjaxRequestTarget can be null. However, the parameter for
> AjaxFallbackButton#onError is AjaxRequestTarget. The AjaxRequestTarget can
> be null so the parameter to #onError should follow #onSubmit and also be
> Optional.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)