1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-25 16:01:38 +03:00

returning null where a Map is expected is not nice

This commit is contained in:
Steve Lhomme
2013-09-23 15:40:17 +02:00
parent 23b1216f85
commit 2deaf1520a

View File

@@ -35,6 +35,7 @@ import java.net.URL;
import java.security.Permission;
import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@@ -159,7 +160,7 @@ public class HttpURLConnectionImpl extends HttpURLConnection implements Policy {
try {
return getResponse().getResponseHeaders().getHeaders().toMultimap(true);
} catch (IOException e) {
return null;
return Collections.emptyMap();
}
}