tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r979865 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Date Tue, 27 Jul 2010 20:56:11 GMT
Author: markt
Date: Tue Jul 27 20:56:10 2010
New Revision: 979865

URL: http://svn.apache.org/viewvc?rev=979865&view=rev
Log:
Fix unit test failure. Ignore exceptions when destroying APR connector if APR was never initialised.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=979865&r1=979864&r2=979865&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Jul 27 20:56:10 2010
@@ -700,14 +700,26 @@ public class AprEndpoint extends Abstrac
         if (running) {
             stop();
         }
-        Pool.destroy(serverSockPool);
+        try {
+            Pool.destroy(serverSockPool);
+        } catch (UnsatisfiedLinkError e) {
+            // Ignore - APR was not initialised
+        }
         serverSockPool = 0;
         // Close server socket
-        Socket.close(serverSock);
+        try {
+            Socket.close(serverSock);
+        } catch (UnsatisfiedLinkError e) {
+            // Ignore - APR was not initialised
+        }
         serverSock = 0;
         sslContext = 0;
         // Close all APR memory pools and resources
-        Pool.destroy(rootPool);
+        try {
+            Pool.destroy(rootPool);
+        } catch (UnsatisfiedLinkError e) {
+            // Ignore - APR was not initialised
+        }
         rootPool = 0;
         initialized = false;
     }



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


Mime
View raw message