-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Refactor ActionListener#map towards Stricter API #65526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor ActionListener#map towards Stricter API #65526
Conversation
Making `#map` look and feel a little nicer, optimize chains of `#map`, and replace `#delegateFailure` calls with `#map` calls where possible in order to enforce callbacks not throwing where possible.
Pinging @elastic/es-core-infra (Team:Core/Infra) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one nit
return new MappedActionListener<>(fn, this); | ||
} | ||
|
||
final class MappedActionListener<Response, O> implements ActionListener<Response> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a more descriptive type name than "O"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
Thanks Ryan! |
Making `#map` look and feel a little nicer, optimize chains of `#map`, and replace `#delegateFailure` calls with `#map` calls where possible in order to enforce callbacks not throwing where possible.
Making
#map
look and feel a little nicer, optimize chains of#map
,and replace
#delegateFailure
calls with#map
calls where possiblein order to enforce callbacks not throwing where possible.