Skip to content
Browse files
Make constructor arg of ReactContextBaseJavaModule @nullable
ExceptionManagers are created before the `ReactApplicationContext`. Once we make them all TurboModule-compatible, they'll also subclasses `ReactContextBaseJavaModule`. This means that they'll need to be created with `ReactApplicationContext`. Since one isn't available, we'll have to call `super(null)` in their constructor.

[Android][Changed] - Make ReactApplicationContext nullable as the constructor argument of ReactContextBaseJavaModule

Reviewed By: PeteTheHeat

Differential Revision: D18935950

fbshipit-source-id: a643a10a42cf36a2a2d6fde87795965f16295d43
  • Loading branch information
RSNara authored and facebook-github-bot committed Dec 11, 2019
1 parent a8fbc5b commit f8d5c5bfd79be0e20a205a1856bd9946143eeacf
Showing 1 changed file with 1 addition and 2 deletions.
@@ -10,7 +10,6 @@
import static com.facebook.infer.annotation.ThreadConfined.ANY;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Assertions;
@@ -28,7 +27,7 @@ public ReactContextBaseJavaModule() {
mReactApplicationContext = null;

public ReactContextBaseJavaModule(@NonNull ReactApplicationContext reactContext) {
public ReactContextBaseJavaModule(@Nullable ReactApplicationContext reactContext) {
mReactApplicationContext = reactContext;

0 comments on commit f8d5c5b

Please sign in to comment.