From 9566ccfa260d83180a9900a545255d3d21c1e9cf Mon Sep 17 00:00:00 2001 From: Jake Wharton Date: Thu, 17 Dec 2015 19:24:43 -0500 Subject: [PATCH] Do not burden application code with close failures. There's no action they can take as the result of them, anyway. --- okhttp/src/main/java/okhttp3/ResponseBody.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/okhttp/src/main/java/okhttp3/ResponseBody.java b/okhttp/src/main/java/okhttp3/ResponseBody.java index 62f9a1449..e2e9cc496 100644 --- a/okhttp/src/main/java/okhttp3/ResponseBody.java +++ b/okhttp/src/main/java/okhttp3/ResponseBody.java @@ -88,8 +88,8 @@ public abstract class ResponseBody implements Closeable { return contentType != null ? contentType.charset(UTF_8) : UTF_8; } - @Override public void close() throws IOException { - source().close(); + @Override public void close() { + Util.closeQuietly(source()); } /**