Adding @Nullable into Fabric UI Manager

Summary: cleanup diff to add Nullable annotations into Fabric UI Manager classes

Reviewed By: shergin

Differential Revision: D15365295

fbshipit-source-id: b9d39addd5b71377389a7687ea3176cd4359c5ba
This commit is contained in:
David Vacca
2019-05-16 13:00:25 -07:00
committed by Facebook Github Bot
parent 99899d008f
commit 016afe26bc
3 changed files with 7 additions and 6 deletions
@@ -187,7 +187,7 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
int rootTag,
int reactTag,
final String componentName,
ReadableMap props,
@Nullable ReadableMap props,
boolean isLayoutable) {
ThemedReactContext context = mReactContextForRootTag.get(rootTag);
String component = getComponent(componentName);
@@ -453,7 +453,7 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
@Override
public void dispatchCommand(
final int reactTag, final int commandId, final ReadableArray commandArgs) {
final int reactTag, final int commandId, @Nullable final ReadableArray commandArgs) {
synchronized (mMountItemsLock) {
mMountItems.add(new DispatchCommandMountItem(reactTag, commandId, commandArgs));
}
@@ -174,7 +174,7 @@ public class MountingManager {
ThemedReactContext themedReactContext,
String componentName,
int reactTag,
ReadableMap props,
@Nullable ReadableMap props,
boolean isLayoutable) {
if (mTagToViewState.get(reactTag) != null) {
return;
@@ -312,7 +312,7 @@ public class MountingManager {
ThemedReactContext reactContext,
String componentName,
int reactTag,
ReadableMap props,
@Nullable ReadableMap props,
boolean isLayoutable) {
if (mTagToViewState.get(reactTag) != null) {
@@ -9,6 +9,7 @@ package com.facebook.react.fabric.mounting.mountitems;
import static com.facebook.react.fabric.FabricUIManager.DEBUG;
import static com.facebook.react.fabric.FabricUIManager.TAG;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.fabric.mounting.MountingManager;
@@ -20,7 +21,7 @@ public class PreAllocateViewMountItem implements MountItem {
private final String mComponent;
private final int mRootTag;
private final int mReactTag;
private final ReadableMap mProps;
private final @Nullable ReadableMap mProps;
private final ThemedReactContext mContext;
private final boolean mIsLayoutable;
@@ -29,7 +30,7 @@ public class PreAllocateViewMountItem implements MountItem {
int rootTag,
int reactTag,
String component,
ReadableMap props,
@Nullable ReadableMap props,
boolean isLayoutable) {
mContext = context;
mComponent = component;