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:
Gijs Weterings
2025-04-09 09:07:30 -07:00
committed by Facebook GitHub Bot
parent 3ece14ebaa
commit d97aba5cd7
@@ -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);
}
}