diff --git a/common/src/main/java/io/netty/util/concurrent/DefaultPromise.java b/common/src/main/java/io/netty/util/concurrent/DefaultPromise.java index 005c0f7d33..cf7c04c0a1 100644 --- a/common/src/main/java/io/netty/util/concurrent/DefaultPromise.java +++ b/common/src/main/java/io/netty/util/concurrent/DefaultPromise.java @@ -471,6 +471,10 @@ public class DefaultPromise extends AbstractFuture implements Promise { } private boolean setFailure0(Throwable cause) { + if (cause == null) { + throw new NullPointerException("cause"); + } + if (isDone()) { return false; }