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: D54027184
  • Loading branch information
mdvacca authored and facebook-github-bot committed Feb 24, 2024
1 parent cc83403 commit 36682be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

package com.facebook.react.uimanager;

import com.facebook.infer.annotation.Nullsafe;

/** Default property values for Views to be shared between Views and ShadowViews. */
@Nullsafe(Nullsafe.Mode.LOCAL)
public class ViewDefaults {

public static final float FONT_SIZE_SP = 14.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.common.ReactConstants;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

/** Helper to handle implementing ViewGroups with custom drawing order based on z-index. */
@Nullsafe(Nullsafe.Mode.LOCAL)
public class ViewGroupDrawingOrderHelper {
private final ViewGroup mViewGroup;
private int mNumberOfChildrenWithZIndex = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.bridge.UiThreadUtil;
import java.util.List;
import java.util.WeakHashMap;

/** Class providing children management API for view managers of classes extending ViewGroup. */
@Nullsafe(Nullsafe.Mode.LOCAL)
public abstract class ViewGroupManager<T extends ViewGroup>
extends BaseViewManager<T, LayoutShadowNode> implements IViewGroupManager<T> {

Expand Down

0 comments on commit 36682be

Please sign in to comment.