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: D54027179
  • Loading branch information
mdvacca authored and facebook-github-bot committed Feb 23, 2024
1 parent 446670e commit cbc0a28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@

import android.view.View;
import android.view.ViewGroup;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.bridge.UiThreadUtil;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

@Nullsafe(Nullsafe.Mode.LOCAL)
class ViewHierarchyDumper {

public static JSONObject toJSON(View view) throws JSONException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
package com.facebook.react.uimanager;

import android.graphics.Color;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableType;
import java.util.Arrays;
import java.util.HashSet;

/** Keys for props that need to be shared across multiple classes. */
@Nullsafe(Nullsafe.Mode.LOCAL)
public class ViewProps {

public static final String VIEW_CLASS_NAME = "RCTView";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@

package com.facebook.react.uimanager;

import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.common.ClearableSynchronizedPool;
import com.facebook.yoga.YogaNode;

/** Static holder for a recycling pool of YogaNodes. */
@Nullsafe(Nullsafe.Mode.LOCAL)
class YogaNodePool {

private static final Object sInitLock = new Object();
Expand Down

0 comments on commit cbc0a28

Please sign in to comment.