Fix a bug where ChannelFuture.setFailure(null) doesn't fail
Motivation: We forgot to do a null check on the cause parameter of ChannelFuture.setFailure(cause) Modifications: Add a null check Result: Fixed issue: #2728
This commit is contained in:
parent
4a3ef90381
commit
e59ec5384d
@ -471,6 +471,10 @@ public class DefaultPromise<V> extends AbstractFuture<V> implements Promise<V> {
|
||||
}
|
||||
|
||||
private boolean setFailure0(Throwable cause) {
|
||||
if (cause == null) {
|
||||
throw new NullPointerException("cause");
|
||||
}
|
||||
|
||||
if (isDone()) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user