Skip to content

Commit 65bf8f0

Browse files
GijsWeteringsfacebook-github-bot
authored andcommitted
Fix Nullsafe FIXMEs for CxxInspectorPackagerConnection.java and mark nullsafe
Summary: 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
1 parent 57a2f50 commit 65bf8f0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import android.os.Handler;
1111
import android.os.Looper;
1212
import androidx.annotation.Nullable;
13+
import com.facebook.infer.annotation.Nullsafe;
1314
import com.facebook.jni.HybridData;
1415
import com.facebook.proguard.annotations.DoNotStrip;
1516
import java.io.Closeable;
@@ -21,7 +22,8 @@
2122
import okhttp3.WebSocketListener;
2223

2324
/** Java wrapper around a C++ InspectorPackagerConnection. */
24-
/* package */ class CxxInspectorPackagerConnection implements IInspectorPackagerConnection {
25+
/* package */ @Nullsafe(Nullsafe.Mode.LOCAL)
26+
class CxxInspectorPackagerConnection implements IInspectorPackagerConnection {
2527
static {
2628
DevSupportSoLoader.staticInit();
2729
}
@@ -39,8 +41,7 @@ private static native HybridData initHybrid(
3941

4042
public native void closeQuietly();
4143

42-
// NULLSAFE_FIXME[Inconsistent Subclass Parameter Annotation]
43-
public native void sendEventToAllConnections(String event);
44+
public native void sendEventToAllConnections(@Nullable String event);
4445

4546
/** Java wrapper around a C++ IWebSocketDelegate, allowing us to call the interface from Java. */
4647
@DoNotStrip

0 commit comments

Comments
 (0)