mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix nullsafe FIXMEs for ModuleHolder.java and mark nullsafe
Summary: Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations. Changelog: [Android][Fixed] Made ModuleHolder.java nullsafe Reviewed By: alanleedev Differential Revision: D72384056 fbshipit-source-id: 42bfdd9b73bdb599ab67b6fe8759c80665156d22
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3ece14ebaa
commit
d97aba5cd7
+3
-1
@@ -18,6 +18,7 @@ import com.facebook.common.logging.FLog;
|
||||
import com.facebook.debug.holder.PrinterHolder;
|
||||
import com.facebook.debug.tags.ReactDebugOverlayTags;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.module.model.ReactModuleInfo;
|
||||
@@ -35,6 +36,7 @@ import javax.inject.Provider;
|
||||
* <p>Lifecycle events via a {@link LifecycleEventListener} will still always happen on the UI
|
||||
* thread.
|
||||
*/
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
@DoNotStrip
|
||||
public class ModuleHolder {
|
||||
|
||||
@@ -96,7 +98,7 @@ public class ModuleHolder {
|
||||
}
|
||||
}
|
||||
if (shouldInitializeNow) {
|
||||
// NULLSAFE_FIXME[Parameter Not Nullable]
|
||||
Assertions.assertNotNull(module);
|
||||
doInitialize(module);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user