Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Nonnull annotation for ReactPackage #23415

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -34,10 +34,12 @@ public interface ReactPackage {
* @param reactContext react application context that can be used to create modules
* @return list of native modules to register with the newly created catalyst instance
*/
@Nonnull
List<NativeModule> createNativeModules(@Nonnull ReactApplicationContext reactContext);

/**
* @return a list of view managers that should be registered with {@link UIManagerModule}
*/
@Nonnull
List<ViewManager> createViewManagers(@Nonnull ReactApplicationContext reactContext);
}
Expand Up @@ -7,6 +7,7 @@

package com.facebook.react.modules.core;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import android.net.Uri;
Expand All @@ -27,7 +28,7 @@
public class DeviceEventManagerModule extends ReactContextBaseJavaModule {
public static final String NAME = "DeviceEventManager";
public interface RCTDeviceEventEmitter extends JavaScriptModule {
void emit(String eventName, @Nullable Object data);
void emit(@Nonnull String eventName, @Nullable Object data);
}

private final Runnable mInvokeDefaultBackPressRunnable;
Expand Down