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
7b6276f1d4
commit
b3c5d67bbd
@ -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…
x
Reference in New Issue
Block a user