This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new c099d68 Remove unnecessary code - align with 9.0.x/10.0.x c099d68 is described below commit c099d68e48bcbb0e8fd54a6ac9bccfcb7432cb07 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed May 19 19:59:46 2021 +0100 Remove unnecessary code - align with 9.0.x/10.0.x --- .../catalina/connector/CoyoteInputStream.java | 33 +--------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/java/org/apache/catalina/connector/CoyoteInputStream.java b/java/org/apache/catalina/connector/CoyoteInputStream.java index 8662e9a..8e47c53 100644 --- a/java/org/apache/catalina/connector/CoyoteInputStream.java +++ b/java/org/apache/catalina/connector/CoyoteInputStream.java @@ -125,32 +125,7 @@ public class CoyoteInputStream extends ServletInputStream { @Override public int read(final byte[] b) throws IOException { - checkNonBlockingRead(); - - if (SecurityUtil.isPackageProtectionEnabled()) { - try { - Integer result = AccessController - .doPrivileged(new PrivilegedExceptionAction<Integer>() { - - @Override - public Integer run() throws IOException { - Integer integer = Integer.valueOf(ib.read(b, 0, b.length)); - return integer; - } - - }); - return result.intValue(); - } catch (PrivilegedActionException pae) { - Exception e = pae.getException(); - if (e instanceof IOException) { - throw (IOException) e; - } else { - throw new RuntimeException(e.getMessage(), e); - } - } - } else { - return ib.read(b, 0, b.length); - } + return read(b, 0, b.length); } @@ -226,12 +201,6 @@ public class CoyoteInputStream extends ServletInputStream { } - @Override - public int readLine(byte[] b, int off, int len) throws IOException { - return super.readLine(b, off, len); - } - - /** * Close the stream * Since we re-cycle, we can't allow the call to super.close() --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org