You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/01/15 11:49:39 UTC

[tomcat] branch master updated: Remove unused deprecated code

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 8c4b36d  Remove unused deprecated code
8c4b36d is described below

commit 8c4b36dfb754822dfbd61468eeb55adc044ccb9b
Author: remm <re...@apache.org>
AuthorDate: Wed Jan 15 12:49:20 2020 +0100

    Remove unused deprecated code
---
 java/org/apache/tomcat/util/net/Nio2Endpoint.java  | 38 ----------------------
 .../apache/tomcat/util/net/SocketWrapperBase.java  | 30 -----------------
 2 files changed, 68 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
index 33037fb..35c9df8 100644
--- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java
+++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
@@ -1333,44 +1333,6 @@ public class Nio2Endpoint extends AbstractJsseEndpoint<Nio2Channel,AsynchronousS
 
 
         @Override
-        public boolean awaitReadComplete(long timeout, TimeUnit unit) {
-            synchronized (readCompletionHandler) {
-                try {
-                    if (readNotify) {
-                        return true;
-                    } else if (readPending.tryAcquire(timeout, unit)) {
-                        readPending.release();
-                        return true;
-                    } else {
-                        return false;
-                    }
-                } catch (InterruptedException e) {
-                    return false;
-                }
-            }
-        }
-
-
-        @Override
-        public boolean awaitWriteComplete(long timeout, TimeUnit unit) {
-            synchronized (writeCompletionHandler) {
-                try {
-                    if (writeNotify) {
-                        return true;
-                    } else if (writePending.tryAcquire(timeout, unit)) {
-                        writePending.release();
-                        return true;
-                    } else {
-                        return false;
-                    }
-                } catch (InterruptedException e) {
-                    return false;
-                }
-            }
-        }
-
-
-        @Override
         public void registerReadInterest() {
             synchronized (readCompletionHandler) {
                 // A notification is already being sent
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index f205725..006e9c2 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1161,36 +1161,6 @@ public abstract class SocketWrapperBase<E> {
     }
 
     /**
-     * If an asynchronous read operation is pending, this method will block
-     * until the operation completes, or the specified amount of time
-     * has passed.
-     * @param timeout The maximum amount of time to wait
-     * @param unit The unit for the timeout
-     * @return <code>true</code> if the read operation is complete,
-     *  <code>false</code> if the operation is still pending and
-     *  the specified timeout has passed
-     */
-    @Deprecated
-    public boolean awaitReadComplete(long timeout, TimeUnit unit) {
-        return true;
-    }
-
-    /**
-     * If an asynchronous write operation is pending, this method will block
-     * until the operation completes, or the specified amount of time
-     * has passed.
-     * @param timeout The maximum amount of time to wait
-     * @param unit The unit for the timeout
-     * @return <code>true</code> if the read operation is complete,
-     *  <code>false</code> if the operation is still pending and
-     *  the specified timeout has passed
-     */
-    @Deprecated
-    public boolean awaitWriteComplete(long timeout, TimeUnit unit) {
-        return true;
-    }
-
-    /**
      * Scatter read. The completion handler will be called once some
      * data has been read or an error occurred. The default NIO2
      * behavior is used: the completion handler will be called as soon


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org