Skip to content

Commit

Permalink
Mark classes of package uimanager as @nullsafe
Browse files Browse the repository at this point in the history
Summary:
All these classes are NullSafe, let's mark them as NullSafe(Local) to ensure lint detect errors in the future

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D54027180
  • Loading branch information
mdvacca authored and facebook-github-bot committed Feb 24, 2024
1 parent 81e64e6 commit bb8065c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import android.widget.EditText;
import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.bridge.CatalystInstance;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReactNoCrashSoftException;
Expand All @@ -26,6 +27,7 @@
import com.facebook.react.uimanager.events.EventDispatcherProvider;

/** Helper class for {@link UIManager}. */
@Nullsafe(Nullsafe.Mode.LOCAL)
public class UIManagerHelper {

private static final String TAG = UIManagerHelper.class.getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

import android.view.accessibility.AccessibilityEvent;
import android.widget.ImageView;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.uimanager.events.TouchEventType;
import java.util.Map;

/** Constants exposed to JS from {@link UIManagerModule}. */
/* package */ class UIManagerModuleConstants {
/* package */ @Nullsafe(Nullsafe.Mode.LOCAL)
class UIManagerModuleConstants {

public static final String ACTION_DISMISSED = "dismissed";
public static final String ACTION_ITEM_SELECTED = "itemSelected";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.common.build.ReactBuildConfig;
import com.facebook.react.config.ReactFeatureFlags;
Expand All @@ -24,6 +25,7 @@
* Helps generate constants map for {@link UIManagerModule} by collecting and merging constants from
* registered view managers.
*/
@Nullsafe(Nullsafe.Mode.LOCAL)
public class UIManagerModuleConstantsHelper {
private static final String TAG = "UIManagerModuleConstantsHelper";
private static final String BUBBLING_EVENTS_KEY = "bubblingEventTypes";
Expand Down

0 comments on commit bb8065c

Please sign in to comment.