You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this requires adding a type declaration to the lambda parameter, e.g., (ChannelFutureListener).
Given the prominence of ChannelFutureListener, would it be worth adding a method signature to ChannelFuture that explicitly supports ChannelFutureListener?
Perhaps it would actually be worth renaming the current addListener in the Future interface to addGenericListener and then introducing type-explicit methods in extensions of Future.
Java 8, which introduced lambdas, allows for the following code:
to become:
However, this requires adding a type declaration to the lambda parameter, e.g.,
(ChannelFutureListener)
.Given the prominence of
ChannelFutureListener
, would it be worth adding a method signature toChannelFuture
that explicitly supportsChannelFutureListener
?Perhaps it would actually be worth renaming the current
addListener
in theFuture
interface toaddGenericListener
and then introducing type-explicit methods in extensions ofFuture
.E.g., the
ChannelFuture
interface would add:Resulting in the slightly less verbose:
The text was updated successfully, but these errors were encountered: