directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1636843 - /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
Date Wed, 05 Nov 2014 09:57:26 GMT
Author: elecharny
Date: Wed Nov  5 09:57:26 2014
New Revision: 1636843

URL: http://svn.apache.org/r1636843
Log:
Removed the ?: syntax

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java?rev=1636843&r1=1636842&r2=1636843&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
Wed Nov  5 09:57:26 2014
@@ -67,6 +67,7 @@ public class DefaultLdapConnectionFactor
         {
             LOG.error( "unable to bind connection: {}", e.getMessage() );
             LOG.debug( "unable to bind connection:", e );
+
             try
             {
                 connection.close();
@@ -76,8 +77,10 @@ public class DefaultLdapConnectionFactor
                 LOG.error( "unable to close failed bind connection: {}", e.getMessage() );
                 LOG.debug( "unable to close failed bind connection:", e );
             }
+
             throw e;
         }
+
         return connection;
     }
 
@@ -106,12 +109,16 @@ public class DefaultLdapConnectionFactor
 
 
     @Override
-    @SuppressWarnings("resource")
     public LdapConnection newUnboundLdapConnection()
     {
-        return configureConnection( apiService == null
-            ? new LdapNetworkConnection( connectionConfig )
-            : new LdapNetworkConnection( connectionConfig, apiService ) );
+        if ( apiService == null )
+        {
+            return configureConnection( new LdapNetworkConnection( connectionConfig ) );
+        }
+        else
+        {
+            return configureConnection( new LdapNetworkConnection( connectionConfig, apiService
) );
+        }
     }
 
 



Mime
View raw message