tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1746506 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java NioEndpoint.java
Date Wed, 01 Jun 2016 22:27:32 GMT
Author: markt
Date: Wed Jun  1 22:27:31 2016
New Revision: 1746506

URL: http://svn.apache.org/viewvc?rev=1746506&view=rev
Log:
Simplify. Method is only called from a single location.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1746506&r1=1746505&r2=1746506&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Jun  1 22:27:31 2016
@@ -136,15 +136,6 @@ public class Nio2Endpoint extends Abstra
     }
 
 
-    protected void releaseCaches() {
-        this.nioChannels.clear();
-        this.processorCache.clear();
-        if (getHandler() != null) {
-            getHandler().recycle();
-        }
-    }
-
-
     // --------------------------------------------------------- Public Methods
 
     /**
@@ -272,7 +263,11 @@ public class Nio2Endpoint extends Abstra
         super.unbind();
         // Unlike other connectors, the thread pool is tied to the server socket
         shutdownExecutor();
-        releaseCaches();
+        this.nioChannels.clear();
+        this.processorCache.clear();
+        if (getHandler() != null) {
+            getHandler().recycle();
+        }
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1746506&r1=1746505&r2=1746506&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed Jun  1 22:27:31 2016
@@ -195,15 +195,6 @@ public class NioEndpoint extends Abstrac
     }
 
 
-    protected void releaseCaches() {
-        this.nioChannels.clear();
-        this.processorCache.clear();
-        if (getHandler() != null ) {
-            getHandler().recycle();
-        }
-    }
-
-
     // --------------------------------------------------------- Public Methods
     /**
      * Number of keep-alive sockets.
@@ -342,7 +333,11 @@ public class NioEndpoint extends Abstrac
         serverSock = null;
         destroySsl();
         super.unbind();
-        releaseCaches();
+        this.nioChannels.clear();
+        this.processorCache.clear();
+        if (getHandler() != null ) {
+            getHandler().recycle();
+        }
         selectorPool.close();
         if (log.isDebugEnabled()) {
             log.debug("Destroy completed for "+new InetSocketAddress(getAddress(),getPort()));



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


Mime
View raw message