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 e7d446b Align with 9.0.x onwards e7d446b is described below commit e7d446bae35f5a0ef6bca294c336158b784f6390 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Feb 16 19:58:46 2022 +0000 Align with 9.0.x onwards --- java/org/apache/tomcat/util/net/Nio2Channel.java | 5 ++--- java/org/apache/tomcat/util/net/NioChannel.java | 10 ++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java b/java/org/apache/tomcat/util/net/Nio2Channel.java index bc5a8b3..f5dd0f3 100644 --- a/java/org/apache/tomcat/util/net/Nio2Channel.java +++ b/java/org/apache/tomcat/util/net/Nio2Channel.java @@ -35,9 +35,9 @@ public class Nio2Channel implements AsynchronousByteChannel { protected static final ByteBuffer emptyBuf = ByteBuffer.allocate(0); + protected final SocketBufferHandler bufHandler; protected AsynchronousSocketChannel sc = null; protected SocketWrapperBase<Nio2Channel> socket = null; - protected final SocketBufferHandler bufHandler; public Nio2Channel(SocketBufferHandler bufHandler) { this.bufHandler = bufHandler; @@ -135,7 +135,7 @@ public class Nio2Channel implements AsynchronousByteChannel { @Override public String toString() { - return super.toString()+":"+this.sc.toString(); + return super.toString() + ":" + sc.toString(); } @Override @@ -213,7 +213,6 @@ public class Nio2Channel implements AsynchronousByteChannel { return DONE; } - private ApplicationBufferHandler appReadBufHandler; public void setAppReadBufHandler(ApplicationBufferHandler handler) { this.appReadBufHandler = handler; diff --git a/java/org/apache/tomcat/util/net/NioChannel.java b/java/org/apache/tomcat/util/net/NioChannel.java index 9b9509f..8f97802 100644 --- a/java/org/apache/tomcat/util/net/NioChannel.java +++ b/java/org/apache/tomcat/util/net/NioChannel.java @@ -39,10 +39,10 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering protected static final ByteBuffer emptyBuf = ByteBuffer.allocate(0); + protected final SocketBufferHandler bufHandler; protected SocketChannel sc = null; protected SocketWrapperBase<NioChannel> socketWrapper = null; - protected final SocketBufferHandler bufHandler; protected Poller poller; @@ -110,11 +110,10 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering * Close the connection. * * @param force Should the underlying socket be forcibly closed? - * * @throws IOException If closing the secure channel fails. */ public void close(boolean force) throws IOException { - if (isOpen() || force ) { + if (isOpen() || force) { close(); } } @@ -229,7 +228,7 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering @Override public String toString() { - return super.toString()+":"+this.sc.toString(); + return super.toString() + ":" + sc.toString(); } public int getOutboundRemaining() { @@ -240,7 +239,6 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering * Return true if the buffer wrote data. NO-OP for non-secure channel. * * @return Always returns {@code false} for non-secure channel - * * @throws IOException Never for non-secure channel */ public boolean flushOutbound() throws IOException { @@ -256,6 +254,7 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering * socket is removed from the poller without the socket being selected. This * results in a connection limit leak for NIO as the endpoint expects the * socket to be selected even in error conditions. + * * @throws IOException If the current thread was interrupted */ protected void checkInterruptStatus() throws IOException { @@ -264,7 +263,6 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering } } - private ApplicationBufferHandler appReadBufHandler; public void setAppReadBufHandler(ApplicationBufferHandler handler) { this.appReadBufHandler = handler; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org