Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
smthing committed Sep 16, 2024
1 parent 925ab41 commit 4587069
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -32,7 +31,7 @@ public ServletInputStreamImpl(HttpServletRequestImpl request, BodyInputStream in

@Override
public boolean isFinished() {
throw new UnsupportedOperationException();
return inputStream.isFinished();
}

@Override
Expand All @@ -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();
}
Expand Down

0 comments on commit 4587069

Please sign in to comment.