diff --git a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java index 345fb94c2b38..5a6307a61e56 100644 --- a/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java +++ b/guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java @@ -35,8 +35,8 @@ public interface ListenableFuture extends Future, @JsMethod @Override default IThenable then( - @JsOptional IThenOnFulfilledCallbackFn onFulfilled, - @JsOptional IThenOnRejectedCallbackFn onRejected) { + @JsOptional @Nullable IThenOnFulfilledCallbackFn onFulfilled, + @JsOptional @Nullable IThenOnRejectedCallbackFn onRejected) { return new Promise( (resolve, reject) -> { Futures.addCallback( @@ -65,8 +65,8 @@ public void onFailure(Throwable throwable) { @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "IThenable") interface IThenable { IThenable then( - @JsOptional IThenOnFulfilledCallbackFn onFulfilled, - @JsOptional IThenOnRejectedCallbackFn onRejected); + @JsOptional @Nullable IThenOnFulfilledCallbackFn onFulfilled, + @JsOptional @Nullable IThenOnRejectedCallbackFn onRejected); @JsFunction interface IThenOnFulfilledCallbackFn { @@ -102,6 +102,6 @@ public Promise(PromiseExecutorCallbackFn executor) {} @Override public native Promise then( - @JsOptional IThenOnFulfilledCallbackFn onFulfilled, - @JsOptional IThenOnRejectedCallbackFn onRejected); + @JsOptional @Nullable IThenOnFulfilledCallbackFn onFulfilled, + @JsOptional @Nullable IThenOnRejectedCallbackFn onRejected); }