提交 bccaf046 编写于 作者: oldratlee's avatar oldratlee 🔥

add @Nonnull for methods runSupplierWith*

上级 20f53377
......@@ -349,7 +349,7 @@ public class TransmittableThreadLocal<T> extends InheritableThreadLocal<T> {
* @see #restore(Object)
* @since 2.3.1
*/
public static <R> R runSupplierWithCaptured(@Nonnull Object captured, Supplier<R> bizLogic) {
public static <R> R runSupplierWithCaptured(@Nonnull Object captured, @Nonnull Supplier<R> bizLogic) {
Object backup = replay(captured);
try {
return bizLogic.get();
......@@ -371,7 +371,7 @@ public class TransmittableThreadLocal<T> extends InheritableThreadLocal<T> {
* @see #restore(Object)
* @since 2.3.1
*/
public static <R> R runCallableWithCaptured(Object captured, Callable<R> bizLogic) throws Exception {
public static <R> R runCallableWithCaptured(@Nonnull Object captured, @Nonnull Callable<R> bizLogic) throws Exception {
Object backup = replay(captured);
try {
return bizLogic.call();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册