Skip to content

Commit f8d5c5b

Browse files
RSNarafacebook-github-bot
authored andcommitted
Make constructor arg of ReactContextBaseJavaModule @nullable
Summary: 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. Changelog: [Android][Changed] - Make ReactApplicationContext nullable as the constructor argument of ReactContextBaseJavaModule Reviewed By: PeteTheHeat Differential Revision: D18935950 fbshipit-source-id: a643a10a42cf36a2a2d6fde87795965f16295d43
1 parent a8fbc5b commit f8d5c5b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContextBaseJavaModule.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import static com.facebook.infer.annotation.ThreadConfined.ANY;
1111

1212
import android.app.Activity;
13-
import androidx.annotation.NonNull;
1413
import androidx.annotation.Nullable;
1514
import com.facebook.common.logging.FLog;
1615
import com.facebook.infer.annotation.Assertions;
@@ -28,7 +27,7 @@ public ReactContextBaseJavaModule() {
2827
mReactApplicationContext = null;
2928
}
3029

31-
public ReactContextBaseJavaModule(@NonNull ReactApplicationContext reactContext) {
30+
public ReactContextBaseJavaModule(@Nullable ReactApplicationContext reactContext) {
3231
mReactApplicationContext = reactContext;
3332
}
3433

0 commit comments

Comments
 (0)