You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2016/06/28 08:47:57 UTC
[jira] [Resolved] (WICKET-6189) Return Optional from
RequestCycle.find(Class)
[ https://issues.apache.org/jira/browse/WICKET-6189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sven Meier resolved WICKET-6189.
--------------------------------
Resolution: Fixed
Fix Version/s: 8.0.0-M1
Having two methods (one returning ART and one Optional<ART) isn't something we want to support, so #find() return the optional now as powwowed.
I've added a warning to the migration guide.
> Return Optional<T> from RequestCycle.find(Class<T>)
> ---------------------------------------------------
>
> Key: WICKET-6189
> URL: https://issues.apache.org/jira/browse/WICKET-6189
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 8.0.0-M1
> Reporter: Sven Meier
> Assignee: Sven Meier
> Priority: Minor
> Fix For: 8.0.0-M1
>
>
> RequestCycle.find(Class<T>) is mostly used to get the current AjaxRequestTarget.
> Since the returned reference might be null (in case of a non-Ajax request), it would be better to return an Optional<AjaxRequestHandler>.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)