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(); }