Skip to content

Commit

Permalink
Update ApplicationWrapper param that received null value to Nullable
Browse files Browse the repository at this point in the history
Summary:
Runtime plugin showed null savedInstanceState passed into onActivityCreated.

## Context
We are in the process of making the entire codebase Nullsafe. This diff relies on a runtime codemod to track when null is passed into a parameter that is not marked as Nullable in java. Based on runtime data, we can be 100% certain that this parameter needs to be Nullable

Reviewed By: jocelynluizzi13

Differential Revision: D60469755

fbshipit-source-id: 2d4385326bff7c4f75c1c26afd2552d2be4fa42b
  • Loading branch information
Philip Corriveau authored and facebook-github-bot committed Jul 31, 2024
1 parent 7143c79 commit 0f76111
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import javax.annotation.Nullable;

public class ApplicationWrapper implements Application.ActivityLifecycleCallbacks {

Expand Down Expand Up @@ -47,7 +48,7 @@ public ApplicationWrapper(Application application) {
}

@Override
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
public void onActivityCreated(Activity activity, @Nullable Bundle savedInstanceState) {
mActivities.add(new WeakReference<>(activity));
notifyListener();
}
Expand Down

0 comments on commit 0f76111

Please sign in to comment.