diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Task.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Task.java index 24f1406990d..5446df15cfc 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Task.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/internal/bolts/Task.java @@ -75,9 +75,12 @@ public class Task implements TaskInterface { private final Object lock = new Object(); private boolean complete; private boolean cancelled; + // NULLSAFE_FIXME[Field Not Initialized] private TResult result; + // NULLSAFE_FIXME[Field Not Initialized] private Exception error; private boolean errorHasBeenObserved; + // NULLSAFE_FIXME[Field Not Initialized] private UnobservedErrorNotifier unobservedErrorNotifier; private List> continuations = new ArrayList<>(); @@ -91,6 +94,7 @@ public class Task implements TaskInterface { if (cancelled) { trySetCancelled(); } else { + // NULLSAFE_FIXME[Parameter Not Nullable] trySetResult(null); } } @@ -151,6 +155,7 @@ public class Task implements TaskInterface { errorHasBeenObserved = true; if (unobservedErrorNotifier != null) { unobservedErrorNotifier.setObserved(); + // NULLSAFE_FIXME[Field Not Nullable] unobservedErrorNotifier = null; } } @@ -175,6 +180,7 @@ public class Task implements TaskInterface { * false} otherwise. */ @Override + // NULLSAFE_FIXME[Inconsistent Subclass Parameter Annotation] public boolean waitForCompletion(long duration, TimeUnit timeUnit) throws InterruptedException { synchronized (lock) { if (!isCompleted()) { @@ -489,6 +495,7 @@ public class Task implements TaskInterface { throw new RuntimeException(e); } } + // NULLSAFE_FIXME[Field Not Nullable] continuations = null; } } @@ -538,6 +545,7 @@ public class Task implements TaskInterface { } } + // NULLSAFE_FIXME[Parameter Not Nullable] private static Task TASK_NULL = new Task<>(null); private static Task TASK_TRUE = new Task<>((Boolean) true); private static Task TASK_FALSE = new Task<>((Boolean) false);