mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix Nullsafe FIXMEs for CxxInspectorPackagerConnection.java and mark nullsafe (#50062)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50062 Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations. Changelog: [Android][Fixed] Made CxxInspectorPackagerConnection.java nullsafe Reviewed By: mdvacca Differential Revision: D71126386 fbshipit-source-id: 94b6fca6972e5f08c22df7bebe6f853b5ceb20a7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0ba17b49f8
commit
fd23a08a3a
+4
-3
@@ -10,6 +10,7 @@ package com.facebook.react.devsupport;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import java.io.Closeable;
|
||||
@@ -21,7 +22,8 @@ import okhttp3.WebSocket;
|
||||
import okhttp3.WebSocketListener;
|
||||
|
||||
/** Java wrapper around a C++ InspectorPackagerConnection. */
|
||||
/* package */ class CxxInspectorPackagerConnection implements IInspectorPackagerConnection {
|
||||
/* package */ @Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
class CxxInspectorPackagerConnection implements IInspectorPackagerConnection {
|
||||
static {
|
||||
DevSupportSoLoader.staticInit();
|
||||
}
|
||||
@@ -39,8 +41,7 @@ import okhttp3.WebSocketListener;
|
||||
|
||||
public native void closeQuietly();
|
||||
|
||||
// NULLSAFE_FIXME[Inconsistent Subclass Parameter Annotation]
|
||||
public native void sendEventToAllConnections(String event);
|
||||
public native void sendEventToAllConnections(@Nullable String event);
|
||||
|
||||
/** Java wrapper around a C++ IWebSocketDelegate, allowing us to call the interface from Java. */
|
||||
@DoNotStrip
|
||||
|
||||
Reference in New Issue
Block a user