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

add missing Nullable annotation for method TtlCallable.get

上级 62bcfb84
......@@ -94,7 +94,8 @@ public final class TtlCallable<V> implements Callable<V>, TtlEnhanced, TtlAttach
* @param callable input {@link Callable}
* @return Wrapped {@link Callable}
*/
public static <T> TtlCallable<T> get(Callable<T> callable) {
@Nullable
public static <T> TtlCallable<T> get(@Nullable Callable<T> callable) {
return get(callable, false);
}
......
......@@ -31,7 +31,7 @@ class TtlCallableTest {
val call = Call("1", ttlInstances)
val ttlCallable = TtlCallable.get(call)
val ttlCallable = TtlCallable.get(call)!!
// create after new Task, won't see parent value in in task!
createParentTtlInstancesAfterCreateChild(ttlInstances)
......@@ -130,7 +130,7 @@ class TtlCallableTest {
@Test
fun test_get_same() {
val call = Call("1")
val ttlCallable = TtlCallable.get(call)
val ttlCallable = TtlCallable.get(call)!!
assertSame(call, ttlCallable.callable)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册