From e557cfd4b7bdffcf3689174acacd65f2e9dbc6f8 Mon Sep 17 00:00:00 2001 From: Looly Date: Mon, 30 Dec 2019 06:22:55 +0800 Subject: [PATCH] add commnet --- hutool-http/src/main/java/cn/hutool/http/HttpResponse.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hutool-http/src/main/java/cn/hutool/http/HttpResponse.java b/hutool-http/src/main/java/cn/hutool/http/HttpResponse.java index 463b348f1..029eb0940 100644 --- a/hutool-http/src/main/java/cn/hutool/http/HttpResponse.java +++ b/hutool-http/src/main/java/cn/hutool/http/HttpResponse.java @@ -420,6 +420,7 @@ public class HttpResponse extends HttpBase implements Closeable { try { IoUtil.copy(in, out); } catch (IORuntimeException e) { + //noinspection StatementWithEmptyBody if (e.getCause() instanceof EOFException || StrUtil.containsIgnoreCase(e.getMessage(), "Premature EOF")) { // 忽略读取HTTP流中的EOF错误 } else { @@ -447,6 +448,7 @@ public class HttpResponse extends HttpBase implements Closeable { try { this.readBody(this.in); } catch (IORuntimeException e) { + //noinspection StatementWithEmptyBody if (e.getCause() instanceof FileNotFoundException) { // 服务器无返回内容,忽略之 } else {