Sven Meier created WICKET-6325:
----------------------------------
Summary: AbstractTree#updateBranch() and #updateNode() make
AjaxRequestTarget mandatory
Key: WICKET-6325
URL: https://issues.apache.org/jira/browse/WICKET-6325
Project: Wicket
Issue Type: Bug
Components: wicket-extensions
Affects Versions: 8.0.0-M3
Reporter: Sven Meier
Assignee: Sven Meier
Priority: Minor
With the new Optional<AjaxRequestTarget> spreading over Wickets code base,
AbstractTree#updateBranch() and #updateNode() were changed (by me) to get an
optional ART.
Further examination shows, that this was a wrong decision:
- most Java experts argue against optional method parameters
- there are cases now where an existing ART must be wrapped in an optional just
to pass it into the methods.
The former solution to check the parameter against null isn't feasible now
either, since you have to use optional#orElse(null) if you happen to have an
Optional<ART> only.
Thus it is better to just make the ART parameter mandatory.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)