diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.java index 4a56e92a88796a..462bd12f107218 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network/RequestBodyUtil.java @@ -30,7 +30,6 @@ import java.util.zip.GZIPOutputStream; import okhttp3.MediaType; import okhttp3.RequestBody; -import okhttp3.internal.Util; import okio.BufferedSink; import okio.ByteString; import okio.Okio; @@ -152,7 +151,7 @@ public void writeTo(BufferedSink sink) throws IOException { source = Okio.source(inputStream); sink.writeAll(source); } finally { - Util.closeQuietly(source); + source.close(); } } };