mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix lint warnings in JavaModuleWrapper (#39820)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39820 In this diff I'm fixing lint warnings in JavaModuleWrapper bypass-github-export-checks changelog: [internal] internal Reviewed By: cortinico Differential Revision: D49930344 fbshipit-source-id: e46908acaadce1bcca2ba1f65c8c9ec8d5fd9592
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5af7b7038c
commit
799beebdd0
+4
-4
@@ -33,7 +33,7 @@ import java.util.Set;
|
||||
@DoNotStrip
|
||||
class JavaModuleWrapper {
|
||||
@DoNotStrip
|
||||
public class MethodDescriptor {
|
||||
public static class MethodDescriptor {
|
||||
@DoNotStrip Method method;
|
||||
@DoNotStrip String signature;
|
||||
@DoNotStrip String name;
|
||||
@@ -50,7 +50,7 @@ class JavaModuleWrapper {
|
||||
mJSInstance = jsInstance;
|
||||
mModuleHolder = moduleHolder;
|
||||
mMethods = new ArrayList<>();
|
||||
mDescs = new ArrayList();
|
||||
mDescs = new ArrayList<>();
|
||||
}
|
||||
|
||||
@DoNotStrip
|
||||
@@ -94,7 +94,7 @@ class JavaModuleWrapper {
|
||||
new JavaMethodWrapper(this, targetMethod, annotation.isBlockingSynchronousMethod());
|
||||
md.name = methodName;
|
||||
md.type = method.getType();
|
||||
if (md.type == BaseJavaModule.METHOD_TYPE_SYNC) {
|
||||
if (BaseJavaModule.METHOD_TYPE_SYNC.equals(md.type)) {
|
||||
md.signature = method.getSignature();
|
||||
md.method = targetMethod;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ class JavaModuleWrapper {
|
||||
|
||||
@DoNotStrip
|
||||
public void invoke(int methodId, ReadableNativeArray parameters) {
|
||||
if (mMethods == null || methodId >= mMethods.size()) {
|
||||
if (methodId >= mMethods.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -20,6 +20,8 @@ import javax.annotation.Nonnull;
|
||||
*/
|
||||
@DoNotStrip
|
||||
public interface NativeModule {
|
||||
|
||||
@DeprecatedInNewArchitecture
|
||||
interface NativeMethod {
|
||||
void invoke(JSInstance jsInstance, ReadableArray parameters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user