Migrate Nullable and NonNull annotations to AndroidX

Summary:
This diff migrates the usages Nullable and NonNull annotations to AndroidX instead of javax.

The purpose of this change is to bring consistency in the annotations used by the core of RN

Reviewed By: makovkastar

Differential Revision: D16054504

fbshipit-source-id: 21d888854da088d2a14615a90d4dc058e5286b91
This commit is contained in:
David Vacca authored and Facebook Github Bot committed 2019-07-11 16:23:29 -07:00
1 parent 96318e438f
commit aa5edca0e2
253 files changed
+432 -384

No files matched your search

@@ -7,6 +7,7 @@ rn_android_library(
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/androidx:annotation"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
],
exported_deps = [
@@ -6,10 +6,10 @@
*/
package com.facebook.common.logging;
import androidx.annotation.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import javax.annotation.Nullable;
public final class FakeLoggingDelegate implements LoggingDelegate {
@@ -11,13 +11,13 @@ import static org.junit.Assert.assertNotNull;
import android.app.Activity;
import android.content.Intent;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.JavaOnlyMap;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactTestHelper;
import com.facebook.react.bridge.WritableMap;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -170,7 +170,7 @@ public class ShareModuleTest {
}
@Override
public void reject(String code, @Nonnull WritableMap userInfo) {
public void reject(String code, @NonNull WritableMap userInfo) {
reject(code, /*Message*/ null, /*Throwable*/ null, userInfo);
}
@@ -180,7 +180,7 @@ public class ShareModuleTest {
}
@Override
public void reject(String code, String message, @Nonnull WritableMap userInfo) {
public void reject(String code, String message, @NonNull WritableMap userInfo) {
reject(code, message, /*Throwable*/ null, userInfo);
}
@@ -16,7 +16,6 @@ import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.uimanager.annotations.ReactPropGroup;
import javax.annotation.Nullable;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;