Skip to content

Commit

Permalink
Adding @nullable into Fabric UI Manager
Browse files Browse the repository at this point in the history
Summary: cleanup diff to add Nullable annotations into Fabric UI Manager classes

Reviewed By: shergin

Differential Revision: D15365295

fbshipit-source-id: b9d39addd5b71377389a7687ea3176cd4359c5ba
  • Loading branch information
mdvacca authored and facebook-github-bot committed May 16, 2019
1 parent 99899d0 commit 016afe2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private void preallocateView(
int rootTag,
int reactTag,
final String componentName,
ReadableMap props,
@Nullable ReadableMap props,
boolean isLayoutable) {
ThemedReactContext context = mReactContextForRootTag.get(rootTag);
String component = getComponent(componentName);
Expand Down Expand Up @@ -453,7 +453,7 @@ public void onHostDestroy() {}

@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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void createViewWithProps(
ThemedReactContext themedReactContext,
String componentName,
int reactTag,
ReadableMap props,
@Nullable ReadableMap props,
boolean isLayoutable) {
if (mTagToViewState.get(reactTag) != null) {
return;
Expand Down Expand Up @@ -312,7 +312,7 @@ public void preallocateView(
ThemedReactContext reactContext,
String componentName,
int reactTag,
ReadableMap props,
@Nullable ReadableMap props,
boolean isLayoutable) {

if (mTagToViewState.get(reactTag) != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
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;
Expand All @@ -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;

Expand All @@ -29,7 +30,7 @@ public PreAllocateViewMountItem(
int rootTag,
int reactTag,
String component,
ReadableMap props,
@Nullable ReadableMap props,
boolean isLayoutable) {
mContext = context;
mComponent = component;
Expand Down

0 comments on commit 016afe2

Please sign in to comment.