Skip to content

Commit

Permalink
Annotate NullSafe(LOCAL) for classes in java/com/facebook/react/modul…
Browse files Browse the repository at this point in the history
…es (facebook#49769)

Summary:

Nullsafety scripts and analysis determine it's safe to annotate these classes as NullSafe(LOCAL)

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D70464130
  • Loading branch information
mdvacca authored and facebook-github-bot committed Mar 3, 2025
1 parent e38d388 commit b526e96
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

package com.facebook.react.modules.network;

import androidx.annotation.Nullable;
import com.facebook.infer.annotation.Nullsafe;
import java.util.Collections;
import java.util.Map;
import okhttp3.Headers;
Expand All @@ -20,12 +22,13 @@
* different RN platform environments, and then consider getting rid of this compat layer
* altogether.
*/
@Nullsafe(Nullsafe.Mode.LOCAL)
public class OkHttpCompat {
public static CookieJarContainer getCookieJarContainer(OkHttpClient client) {
return (CookieJarContainer) client.cookieJar();
}

public static Headers getHeadersFromMap(Map<String, String> headers) {
public static Headers getHeadersFromMap(@Nullable Map<String, String> headers) {
if (headers == null) {
return Headers.of(Collections.emptyMap());
} else {
Expand Down

0 comments on commit b526e96

Please sign in to comment.