From 458706927b786d4e444b60825281559711d45e23 Mon Sep 17 00:00:00 2001 From: zhengjw22 Date: Mon, 16 Sep 2024 10:34:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../smartboot/servlet/impl/ServletInputStreamImpl.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/servlet-core/src/main/java/tech/smartboot/servlet/impl/ServletInputStreamImpl.java b/servlet-core/src/main/java/tech/smartboot/servlet/impl/ServletInputStreamImpl.java index d25b568..10da941 100644 --- a/servlet-core/src/main/java/tech/smartboot/servlet/impl/ServletInputStreamImpl.java +++ b/servlet-core/src/main/java/tech/smartboot/servlet/impl/ServletInputStreamImpl.java @@ -22,7 +22,6 @@ */ public class ServletInputStreamImpl extends ServletInputStream { private final BodyInputStream inputStream; - private ReadListener readListener; private final HttpServletRequestImpl request; public ServletInputStreamImpl(HttpServletRequestImpl request, BodyInputStream inputStream) { @@ -32,7 +31,7 @@ public ServletInputStreamImpl(HttpServletRequestImpl request, BodyInputStream in @Override public boolean isFinished() { - throw new UnsupportedOperationException(); + return inputStream.isFinished(); } @Override @@ -46,12 +45,6 @@ public boolean isReady() { @Override public void setReadListener(ReadListener readListener) { - if (readListener == null) { - throw new NullPointerException(); - } - if (this.readListener != null) { - throw new IllegalStateException(); - } if (!request.isAsyncStarted()) { throw new IllegalStateException(); }