Skip to content

Commit 7f58189

Browse files
idefacebook-github-bot
authored andcommittedJan 10, 2018
Change inlined okhttp3.Headers references to a Java import
Summary: In BundleDownloader.java, there were references to `okhttp3.Headers` instead of importing the class at the top of the file. This PR is a simple change to use an import instead. Compile the Android app (If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.) [ANDROID][MINOR][BundleDownloader] - Use Java import instead of fully qualified class name Closes #17507 Differential Revision: D6691593 Pulled By: hramos fbshipit-source-id: 81b366db608b7be8a903d2f25b36ca5642d9eec3
1 parent b9b7fab commit 7f58189

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎ReactAndroid/src/main/java/com/facebook/react/devsupport/BundleDownloader.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import javax.annotation.Nullable;
2929
import okhttp3.Call;
3030
import okhttp3.Callback;
31+
import okhttp3.Headers;
3132
import okhttp3.OkHttpClient;
3233
import okhttp3.Request;
3334
import okhttp3.Response;
@@ -171,7 +172,7 @@ public void execute(Map<String, String> headers, Buffer body, boolean finished)
171172
if (headers.containsKey("X-Http-Status")) {
172173
status = Integer.parseInt(headers.get("X-Http-Status"));
173174
}
174-
processBundleResult(url, status, okhttp3.Headers.of(headers), body, outputFile, bundleInfo, callback);
175+
processBundleResult(url, status, Headers.of(headers), body, outputFile, bundleInfo, callback);
175176
} else {
176177
if (!headers.containsKey("Content-Type") || !headers.get("Content-Type").equals("application/json")) {
177178
return;
@@ -221,7 +222,7 @@ public void cancelDownloadBundleFromURL() {
221222
private void processBundleResult(
222223
String url,
223224
int statusCode,
224-
okhttp3.Headers headers,
225+
Headers headers,
225226
BufferedSource body,
226227
File outputFile,
227228
BundleInfo bundleInfo,
@@ -380,7 +381,7 @@ private static boolean isDeltaUrl(String bundleUrl) {
380381
return bundleUrl.indexOf(".delta?") != -1;
381382
}
382383

383-
private static void populateBundleInfo(String url, okhttp3.Headers headers, BundleInfo bundleInfo) {
384+
private static void populateBundleInfo(String url, Headers headers, BundleInfo bundleInfo) {
384385
bundleInfo.mUrl = url;
385386

386387
String filesChangedCountStr = headers.get("X-Metro-Files-Changed-Count");

0 commit comments

Comments
 (0)