Skip to content
Browse files

@nonnull annotation for ReactPackage (#23415)

Here are some leftovers from nullable annotations for native modules, discovered while developing native module in Kotlin. This will help improve Kotlin developer experience

[Android] [Changed] - Add Nonnull annotations to ReactPackage
Pull Request resolved: #23415

Differential Revision: D14064607

Pulled By: cpojer

fbshipit-source-id: af2ce1fc1911ee03c54b20a4fc3a6d1aba9267da
  • Loading branch information...
dulmandakh authored and grabbou committed Feb 13, 2019
1 parent 818f6bb commit e6d8ac8424ee4c1c50d21a0576a491c1ee1a4090
@@ -34,10 +34,12 @@
* @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
List<NativeModule> createNativeModules(@Nonnull ReactApplicationContext reactContext);

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

package com.facebook.react.modules.core;

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

@@ -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;

0 comments on commit e6d8ac8

Please sign in to comment.
You can’t perform that action at this time.