directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1588275 - /directory/apacheds/trunk/service/src/test/java/org/apache/directory/server/UberJarMainTest.java
Date Thu, 17 Apr 2014 15:11:31 GMT
Author: elecharny
Date: Thu Apr 17 15:11:30 2014
New Revision: 1588275

URL: http://svn.apache.org/r1588275
Log:
Removed a warning (closing a connection)

Modified:
    directory/apacheds/trunk/service/src/test/java/org/apache/directory/server/UberJarMainTest.java

Modified: directory/apacheds/trunk/service/src/test/java/org/apache/directory/server/UberJarMainTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service/src/test/java/org/apache/directory/server/UberJarMainTest.java?rev=1588275&r1=1588274&r2=1588275&view=diff
==============================================================================
--- directory/apacheds/trunk/service/src/test/java/org/apache/directory/server/UberJarMainTest.java
(original)
+++ directory/apacheds/trunk/service/src/test/java/org/apache/directory/server/UberJarMainTest.java
Thu Apr 17 15:11:30 2014
@@ -103,6 +103,8 @@ public class UberJarMainTest
         {
             public void run()
             {
+                LdapNetworkConnection connection = null;
+                
                 try
                 {
                     // Creating a connection on the created server
@@ -112,7 +114,7 @@ public class UberJarMainTest
                     configuration.setName( ServerDNConstants.ADMIN_SYSTEM_DN );
                     configuration.setCredentials( PartitionNexus.ADMIN_PASSWORD_STRING );
                     configuration.setBinaryAttributeDetector( new SchemaBinaryAttributeDetector(
null ) );
-                    LdapNetworkConnection connection = new LdapNetworkConnection( configuration
);
+                    connection = new LdapNetworkConnection( configuration );
                     connection.loadSchema();
 
                     // Binding on the connection
@@ -132,6 +134,17 @@ public class UberJarMainTest
                 {
                     verified = false;
                 }
+                finally
+                {
+                    try
+                    {
+                        connection.close();
+                    }
+                    catch ( Exception e )
+                    {
+                        // nothing we can do
+                    }
+                }
             };
         };
         



Mime
View raw message