Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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