You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2016/06/15 07:52:35 UTC

svn commit: r1748510 [1/2] - in /directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api: ./ callback/ future/ search/

Author: elecharny
Date: Wed Jun 15 07:52:34 2016
New Revision: 1748510

URL: http://svn.apache.org/viewvc?rev=1748510&view=rev
Log:
Fixed a lot of Sonar warnings

Modified:
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionValidator.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/Krb5LoginConfiguration.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionWrapper.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LookupLdapConnectionValidator.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslDigestMd5Request.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslGssApiRequest.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/search/Filter.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/search/SetOfFiltersFilter.java
    directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/search/SubstringFilter.java

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java Wed Jun 15 07:52:34 2016
@@ -79,6 +79,7 @@ public abstract class AbstractLdapConnec
     /**
      * {@inheritDoc}
      */
+    @Override
     public void bind( Dn name ) throws LdapException
     {
         byte[] credBytes = StringConstants.EMPTY_BYTES;
@@ -96,6 +97,7 @@ public abstract class AbstractLdapConnec
     /**
      * {@inheritDoc}
      */
+    @Override
     public void bind( String name ) throws LdapException
     {
         LOG.debug( "Bind request : {}", name );
@@ -107,6 +109,7 @@ public abstract class AbstractLdapConnec
     /**
      * {@inheritDoc}
      */
+    @Override
     public void bind( String name, String credentials ) throws LdapException
     {
         bind( new Dn( schemaManager, name ), credentials );
@@ -116,9 +119,10 @@ public abstract class AbstractLdapConnec
     /**
      * {@inheritDoc}
      */
+    @Override
     public void bind( Dn name, String credentials ) throws LdapException
     {
-        byte[] credBytes = ( credentials == null ? StringConstants.EMPTY_BYTES : Strings.getBytesUtf8( credentials ) );
+        byte[] credBytes = credentials == null ? StringConstants.EMPTY_BYTES : Strings.getBytesUtf8( credentials );
 
         BindRequest bindRequest = new BindRequestImpl();
         bindRequest.setDn( name );

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractPoolableLdapConnectionFactory.java Wed Jun 15 07:52:34 2016
@@ -51,6 +51,7 @@ public abstract class AbstractPoolableLd
      * 
      * There is nothing to do to activate a connection.
      */
+    @Override
     public void activateObject( LdapConnection connection ) throws LdapException
     {
         LOG.debug( "Activating {}", connection );
@@ -68,6 +69,7 @@ public abstract class AbstractPoolableLd
      * Destroying a connection will unbind it which will result on a shutdown
      * of teh underlying protocol.
      */
+    @Override
     public void destroyObject( LdapConnection connection ) throws LdapException
     {
         LOG.debug( "Destroying {}", connection );
@@ -104,6 +106,7 @@ public abstract class AbstractPoolableLd
      * 
      * @throws LdapException If unable to connect.
      */
+    @Override
     public LdapConnection makeObject() throws LdapException
     {
         LOG.debug( "Creating a LDAP connection" );
@@ -136,6 +139,7 @@ public abstract class AbstractPoolableLd
      * 
      * @throws LdapException If unable to reconfigure and rebind.
      */
+    @Override
     public void passivateObject( LdapConnection connection ) throws LdapException
     {
         LOG.debug( "Passivating {}", connection );
@@ -167,6 +171,7 @@ public abstract class AbstractPoolableLd
      * 
      * Validating a connection is done by checking the connection status.
      */
+    @Override
     public boolean validateObject( LdapConnection connection )
     {
         LOG.debug( "Validating {}", connection );

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionFactory.java Wed Jun 15 07:52:34 2016
@@ -74,7 +74,7 @@ public class DefaultLdapConnectionFactor
             }
             catch ( IOException ioe )
             {
-                LOG.error( "unable to close failed bind connection: {}", e.getMessage() );
+                LOG.error( "unable to close failed bind connection: {}", e.getMessage(), ioe );
                 LOG.debug( "unable to close failed bind connection:", e );
             }
 

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionValidator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionValidator.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionValidator.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultLdapConnectionValidator.java Wed Jun 15 07:52:34 2016
@@ -34,6 +34,7 @@ public final class DefaultLdapConnection
      * @param connection The connection to validate
      * @return True, if the connection is still valid
      */
+    @Override
     public boolean validate( LdapConnection connection )
     {
         return connection.isConnected() && connection.isAuthenticated();

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java Wed Jun 15 07:52:34 2016
@@ -211,6 +211,27 @@ public class DefaultSchemaLoader extends
 
 
     /**
+     * Creates a new instance of NetworkSchemaLoader.
+     *
+     * @param connection the LDAP connection
+     * @throws Exception if the connection is not authenticated or if there are any problems
+     *                   while loading the schema entries
+     */
+    public DefaultSchemaLoader( LdapConnection connection, Dn subschemaSubentryDn ) throws LdapException
+    {
+        if ( !connection.isAuthenticated() )
+        {
+            throw new IllegalArgumentException( "connection is not authenticated" );
+        }
+
+        this.connection = connection;
+        this.subschemaSubentryDn = subschemaSubentryDn;
+
+        loadSchemas();
+    }
+
+
+    /**
      * Indicates if the given Root DSE corresponds to an ApacheDS server.
      *
      * @param rootDse the Root DSE
@@ -235,27 +256,6 @@ public class DefaultSchemaLoader extends
 
 
     /**
-     * Creates a new instance of NetworkSchemaLoader.
-     *
-     * @param connection the LDAP connection
-     * @throws Exception if the connection is not authenticated or if there are any problems
-     *                   while loading the schema entries
-     */
-    public DefaultSchemaLoader( LdapConnection connection, Dn subschemaSubentryDn ) throws Exception
-    {
-        if ( !connection.isAuthenticated() )
-        {
-            throw new IllegalArgumentException( "connection is not authenticated" );
-        }
-
-        this.connection = connection;
-        this.subschemaSubentryDn = subschemaSubentryDn;
-
-        loadSchemas();
-    }
-
-
-    /**
      * Load all the schemas.
      * 
      * @param subschemaSubentryDn
@@ -637,7 +637,7 @@ public class DefaultSchemaLoader extends
     private void updateSchemas( SchemaObject schemaObject )
     {
         String schemaName = schemaObject.getSchemaName();
-        Schema schema = null;
+        Schema schema;
 
         if ( Strings.isEmpty( schemaName ) || "null".equals( schemaName ) )
         {
@@ -664,9 +664,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadAttributeTypes( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> attributeTypeEntries = new ArrayList<Entry>();
+        List<Entry> attributeTypeEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -701,9 +702,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadComparators( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> comparatorEntries = new ArrayList<Entry>();
+        List<Entry> comparatorEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -735,9 +737,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadDitContentRules( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> ditContentRuleEntries = new ArrayList<Entry>();
+        List<Entry> ditContentRuleEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -772,9 +775,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadDitStructureRules( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> ditStructureRuleEntries = new ArrayList<Entry>();
+        List<Entry> ditStructureRuleEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -809,9 +813,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadMatchingRuleUses( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> matchingRuleUseEntries = new ArrayList<Entry>();
+        List<Entry> matchingRuleUseEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -846,9 +851,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadMatchingRules( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> matchingRuleEntries = new ArrayList<Entry>();
+        List<Entry> matchingRuleEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -883,9 +889,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadNameForms( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> nameFormEntries = new ArrayList<Entry>();
+        List<Entry> nameFormEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -920,9 +927,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadNormalizers( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> normalizerEntries = new ArrayList<Entry>();
+        List<Entry> normalizerEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -954,9 +962,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadObjectClasses( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> objectClassEntries = new ArrayList<Entry>();
+        List<Entry> objectClassEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -991,9 +1000,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadSyntaxCheckers( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> syntaxCheckerEntries = new ArrayList<Entry>();
+        List<Entry> syntaxCheckerEntries = new ArrayList<>();
 
         if ( schemas == null )
         {
@@ -1025,9 +1035,10 @@ public class DefaultSchemaLoader extends
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<Entry> loadSyntaxes( Schema... schemas ) throws LdapException, IOException
     {
-        List<Entry> syntaxEntries = new ArrayList<Entry>();
+        List<Entry> syntaxEntries = new ArrayList<>();
 
         if ( schemas == null )
         {

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java Wed Jun 15 07:52:34 2016
@@ -87,6 +87,7 @@ public class EntryCursorImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean next() throws LdapException, CursorException
     {
         if ( !searchCursor.next() )
@@ -144,6 +145,7 @@ public class EntryCursorImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry get() throws CursorException
     {
         if ( !searchCursor.available() )
@@ -183,6 +185,7 @@ public class EntryCursorImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchResultDone getSearchResultDone()
     {
         return searchCursor.getSearchResultDone();
@@ -192,6 +195,7 @@ public class EntryCursorImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean available()
     {
         return searchCursor.available();
@@ -234,6 +238,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public void after( Entry element ) throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -245,6 +250,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public void afterLast() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -256,6 +262,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public void before( Entry element ) throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -267,6 +274,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public void beforeFirst() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -278,6 +286,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public boolean first() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -289,6 +298,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public boolean last() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -300,6 +310,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public boolean previous() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -310,6 +321,7 @@ public class EntryCursorImpl extends Abs
     /**
      * {@inheritDoc}
      */
+    @Override
     public int getMessageId()
     {
         return messageId;

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/Krb5LoginConfiguration.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/Krb5LoginConfiguration.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/Krb5LoginConfiguration.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/Krb5LoginConfiguration.java Wed Jun 15 07:52:34 2016
@@ -44,7 +44,7 @@ public class Krb5LoginConfiguration exte
     {
         String loginModule = "com.sun.security.auth.module.Krb5LoginModule";
 
-        HashMap<String, Object> options = new HashMap<String, Object>();
+        HashMap<String, Object> options = new HashMap<>();
 
         // TODO: this only works for Sun JVM
         options.put( "refreshKrb5Config", "true" );
@@ -60,6 +60,7 @@ public class Krb5LoginConfiguration exte
      * @param applicationName the application name
      * @return the configuration entry
      */
+    @Override
     public AppConfigurationEntry[] getAppConfigurationEntry( String applicationName )
     {
         // We will ignore the applicationName, since we want all apps to use Kerberos V5
@@ -70,6 +71,7 @@ public class Krb5LoginConfiguration exte
     /**
      * Interface method for reloading the configuration.  We don't need this.
      */
+    @Override
     public void refresh()
     {
         // Right now this is a load once scheme and we will not implement the refresh method

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java Wed Jun 15 07:52:34 2016
@@ -102,6 +102,7 @@ public interface LdapConnection extends
      *
      * @throws IOException if some I/O error occurs
      */
+    @Override
     void close() throws IOException;
 
 

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java Wed Jun 15 07:52:34 2016
@@ -149,11 +149,11 @@ public class LdapConnectionConfig
         }
         catch ( NoSuchAlgorithmException e )
         {
-            LOG.warn( "couldn't find any default X509 TrustManager with algorithm {}", trustMgmtAlgo );
+            LOG.warn( "couldn't find any default X509 TrustManager with algorithm {}", trustMgmtAlgo, e );
         }
         catch ( KeyStoreException e )
         {
-            LOG.warn( "couldn't initialize TrustManagerFactory with keystore {}", KeyStore.getDefaultType() );
+            LOG.warn( "couldn't initialize TrustManagerFactory with keystore {}", KeyStore.getDefaultType(), e );
         }
     }
 

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionPool.java Wed Jun 15 07:52:34 2016
@@ -125,11 +125,7 @@ public class LdapConnectionPool extends
         }
         catch ( LdapException e )
         {
-            throw ( e );
-        }
-        catch ( RuntimeException e )
-        {
-            throw ( e );
+            throw e;
         }
         catch ( Exception e )
         {
@@ -171,11 +167,7 @@ public class LdapConnectionPool extends
         }
         catch ( LdapException e )
         {
-            throw ( e );
-        }
-        catch ( RuntimeException e )
-        {
-            throw ( e );
+            throw e;
         }
         catch ( Exception e )
         {

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionWrapper.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionWrapper.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionWrapper.java Wed Jun 15 07:52:34 2016
@@ -77,6 +77,7 @@ public class LdapConnectionWrapper imple
     /**
      * {@inheritDoc}
      */
+    @Override
     public LdapConnection wrapped()
     {
         return connection;

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Wed Jun 15 07:52:34 2016
@@ -56,7 +56,6 @@ import org.apache.directory.api.asn1.Dec
 import org.apache.directory.api.asn1.util.Oid;
 import org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector;
 import org.apache.directory.api.ldap.codec.api.DefaultConfigurableBinaryAttributeDetector;
-import org.apache.directory.api.ldap.codec.api.ExtendedResponseDecorator;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
 import org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory;
 import org.apache.directory.api.ldap.codec.api.LdapDecoder;
@@ -207,7 +206,7 @@ public class LdapNetworkConnection exten
     private IoSession ldapSession;
 
     /** a map to hold the ResponseFutures for all operations */
-    private Map<Integer, ResponseFuture<? extends Response>> futureMap = new ConcurrentHashMap<Integer, ResponseFuture<? extends Response>>();
+    private Map<Integer, ResponseFuture<? extends Response>> futureMap = new ConcurrentHashMap<>();
 
     /** list of controls supported by the server */
     private List<String> supportedControls;
@@ -242,109 +241,7 @@ public class LdapNetworkConnection exten
     static final String NO_RESPONSE_ERROR = "The response queue has been emptied, no response was found.";
 
 
-    //--------------------------- Helper methods ---------------------------//
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isConnected()
-    {
-        return ( ldapSession != null ) && connected.get() && !ldapSession.isClosing();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isAuthenticated()
-    {
-        return isConnected() && authenticated.get();
-    }
-
-
-    /**
-     * Check that a session is valid, ie we can send requests to the
-     * server
-     *
-     * @throws Exception If the session is not valid
-     */
-    private void checkSession() throws InvalidConnectionException
-    {
-        if ( ldapSession == null )
-        {
-            throw new InvalidConnectionException( "Cannot connect on the server, the connection is null" );
-        }
-
-        if ( !connected.get() )
-        {
-            throw new InvalidConnectionException( "Cannot connect on the server, the connection is invalid" );
-        }
-    }
-
-
-    private void addToFutureMap( int messageId, ResponseFuture<? extends Response> future )
-    {
-        LOG.debug( "Adding <" + messageId + ", " + future.getClass().getName() + ">" );
-        futureMap.put( messageId, future );
-    }
-
-
-    private ResponseFuture<? extends Response> getFromFutureMap( int messageId )
-    {
-        ResponseFuture<? extends Response> future = futureMap.remove( messageId );
-
-        if ( future != null )
-        {
-            LOG.debug( "Removing <" + messageId + ", " + future.getClass().getName() + ">" );
-        }
-
-        return future;
-    }
-
-
-    private ResponseFuture<? extends Response> peekFromFutureMap( int messageId )
-    {
-        ResponseFuture<? extends Response> future = futureMap.get( messageId );
-
-        // future can be null if there was a abandon operation on that messageId
-        if ( future != null )
-        {
-            LOG.debug( "Getting <" + messageId + ", " + future.getClass().getName() + ">" );
-        }
-
-        return future;
-    }
-
-
-    /**
-     * Get the largest timeout from the search time limit and the connection
-     * timeout.
-     */
-    public long getTimeout( long connectionTimoutInMS, int searchTimeLimitInSeconds )
-    {
-        if ( searchTimeLimitInSeconds < 0 )
-        {
-            return connectionTimoutInMS;
-        }
-        else if ( searchTimeLimitInSeconds == 0 )
-        {
-            if ( config.getTimeout() == 0 )
-            {
-                return Long.MAX_VALUE;
-            }
-            else
-            {
-                return config.getTimeout();
-            }
-        }
-        else
-        {
-            long searchTimeLimitInMS = searchTimeLimitInSeconds * 1000L;
-            return Math.max( searchTimeLimitInMS, connectionTimoutInMS );
-        }
-    }
-
-
-    //------------------------- The constructors --------------------------//
+   //------------------------- The constructors --------------------------//
     /**
      * Create a new instance of a LdapConnection on localhost,
      * port 389.
@@ -540,10 +437,115 @@ public class LdapNetworkConnection exten
     }
 
 
-    //-------------------------- The methods ---------------------------//
+    //--------------------------- Helper methods ---------------------------//
     /**
      * {@inheritDoc}
      */
+    @Override
+    public boolean isConnected()
+    {
+        return ( ldapSession != null ) && connected.get() && !ldapSession.isClosing();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isAuthenticated()
+    {
+        return isConnected() && authenticated.get();
+    }
+
+
+    /**
+     * Check that a session is valid, ie we can send requests to the
+     * server
+     *
+     * @throws Exception If the session is not valid
+     */
+    private void checkSession() throws InvalidConnectionException
+    {
+        if ( ldapSession == null )
+        {
+            throw new InvalidConnectionException( "Cannot connect on the server, the connection is null" );
+        }
+
+        if ( !connected.get() )
+        {
+            throw new InvalidConnectionException( "Cannot connect on the server, the connection is invalid" );
+        }
+    }
+
+
+    private void addToFutureMap( int messageId, ResponseFuture<? extends Response> future )
+    {
+        LOG.debug( "Adding <" + messageId + ", " + future.getClass().getName() + ">" );
+        futureMap.put( messageId, future );
+    }
+
+
+    private ResponseFuture<? extends Response> getFromFutureMap( int messageId )
+    {
+        ResponseFuture<? extends Response> future = futureMap.remove( messageId );
+
+        if ( future != null )
+        {
+            LOG.debug( "Removing <" + messageId + ", " + future.getClass().getName() + ">" );
+        }
+
+        return future;
+    }
+
+
+    private ResponseFuture<? extends Response> peekFromFutureMap( int messageId )
+    {
+        ResponseFuture<? extends Response> future = futureMap.get( messageId );
+
+        // future can be null if there was a abandon operation on that messageId
+        if ( future != null )
+        {
+            LOG.debug( "Getting <" + messageId + ", " + future.getClass().getName() + ">" );
+        }
+
+        return future;
+    }
+
+
+    /**
+     * Get the largest timeout from the search time limit and the connection
+     * timeout.
+     */
+    public long getTimeout( long connectionTimoutInMS, int searchTimeLimitInSeconds )
+    {
+        if ( searchTimeLimitInSeconds < 0 )
+        {
+            return connectionTimoutInMS;
+        }
+        else if ( searchTimeLimitInSeconds == 0 )
+        {
+            if ( config.getTimeout() == 0 )
+            {
+                return Long.MAX_VALUE;
+            }
+            else
+            {
+                return config.getTimeout();
+            }
+        }
+        else
+        {
+            long searchTimeLimitInMS = searchTimeLimitInSeconds * 1000L;
+            return Math.max( searchTimeLimitInMS, connectionTimoutInMS );
+        }
+    }
+
+
+     //-------------------------- The methods ---------------------------//
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public boolean connect() throws LdapException
     {
         if ( ( ldapSession != null ) && connected.get() )
@@ -602,7 +604,6 @@ public class LdapNetworkConnection exten
                             // No need to wait
                             // We know that there was a permanent error such as "connection refused".
                             LOG.debug( "------>> Connection error: {}", connectionFuture.getException().getMessage() );
-                            break;
                         }
 
                         LOG.debug( "------>>   Cannot get the connection... Retrying" );
@@ -621,10 +622,6 @@ public class LdapNetworkConnection exten
                             throw new LdapOtherException( e.getMessage(), e );
                         }
                     }
-                    else
-                    {
-                        break;
-                    }
                 }
             }
         }
@@ -679,14 +676,14 @@ public class LdapNetworkConnection exten
         // Add a listener to close the session in the session.
         closeFuture.addListener( new IoFutureListener<IoFuture>()
         {
+            @Override
             public void operationComplete( IoFuture future )
             {
                 // Process all the waiting operations and cancel them
                 LOG.debug( "received a NoD, closing everything" );
 
-                for ( int messageId : futureMap.keySet() )
+                for ( ResponseFuture<?> responseFuture : futureMap.values() )
                 {
-                    ResponseFuture<?> responseFuture = futureMap.get( messageId );
                     LOG.debug( "closing {}", responseFuture );
 
                     responseFuture.cancel();
@@ -726,13 +723,9 @@ public class LdapNetworkConnection exten
                             ( ( SearchFuture ) responseFuture ).set( SearchNoDResponse.PROTOCOLERROR );
                         }
                     }
-                    catch ( ExecutionException e )
-                    {
-                        LOG.error( "Error while processing the NoD for {}", responseFuture );
-                    }
-                    catch ( InterruptedException e )
+                    catch ( ExecutionException | InterruptedException e )
                     {
-                        LOG.error( "Error while processing the NoD for {}", responseFuture );
+                        LOG.error( "Error while processing the NoD for {}", responseFuture, e );
                     }
 
                     futureMap.remove( messageId );
@@ -783,6 +776,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void close() throws IOException
     {
         // Close the session
@@ -820,6 +814,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void add( Entry entry ) throws LdapException
     {
         if ( entry == null )
@@ -841,6 +836,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddFuture addAsync( Entry entry ) throws LdapException
     {
         if ( entry == null )
@@ -860,6 +856,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddResponse add( AddRequest addRequest ) throws LdapException
     {
         if ( addRequest == null )
@@ -936,6 +933,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public AddFuture addAsync( AddRequest addRequest ) throws LdapException
     {
         if ( addRequest == null )
@@ -973,6 +971,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void abandon( int messageId )
     {
         if ( messageId < 0 )
@@ -992,6 +991,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void abandon( AbandonRequest abandonRequest )
     {
         if ( abandonRequest == null )
@@ -1045,6 +1045,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void bind() throws LdapException
     {
         LOG.debug( "Bind request" );
@@ -1061,6 +1062,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void anonymousBind() throws LdapException
     {
         LOG.debug( "Anonymous Bind request" );
@@ -1077,7 +1079,8 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public BindFuture bindAsync() throws LdapException
+    @Override
+public BindFuture bindAsync() throws LdapException
     {
         LOG.debug( "Asynchronous Bind request" );
 
@@ -1091,6 +1094,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindFuture anonymousBindAsync() throws LdapException
     {
         LOG.debug( "Anonymous asynchronous Bind request" );
@@ -1124,6 +1128,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindFuture bindAsync( String name, String credentials ) throws LdapException
     {
         LOG.debug( "Bind request : {}", name );
@@ -1164,6 +1169,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindFuture bindAsync( Dn name, String credentials ) throws LdapException
     {
         LOG.debug( "Bind request : {}", name );
@@ -1185,6 +1191,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindResponse bind( BindRequest bindRequest ) throws LdapException
     {
         if ( bindRequest == null )
@@ -1261,6 +1268,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public BindFuture bindAsync( BindRequest bindRequest ) throws LdapException
     {
         if ( bindRequest == null )
@@ -1645,6 +1653,7 @@ public class LdapNetworkConnection exten
             final SaslGssApiRequest requetFinal = request;
             return ( BindFuture ) Subject.doAs( loginContext.getSubject(), new PrivilegedExceptionAction<Object>()
             {
+                @Override
                 public Object run() throws Exception
                 {
                     return bindSasl( requetFinal );
@@ -1661,6 +1670,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public EntryCursor search( Dn baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
@@ -1687,6 +1697,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public EntryCursor search( String baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
@@ -1697,6 +1708,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchFuture searchAsync( Dn baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
@@ -1717,6 +1729,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchFuture searchAsync( String baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException
     {
@@ -1727,6 +1740,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchFuture searchAsync( SearchRequest searchRequest ) throws LdapException
     {
         if ( searchRequest == null )
@@ -1778,6 +1792,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchCursor search( SearchRequest searchRequest ) throws LdapException
     {
         if ( searchRequest == null )
@@ -1801,6 +1816,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void unBind() throws LdapException
     {
         // If the session has not been establish, or is closed, we get out immediately
@@ -1820,9 +1836,7 @@ public class LdapNetworkConnection exten
         // Use this for logging instead: WriteFuture unbindFuture = ldapSession.write( unbindRequest );
         WriteFuture unbindFuture = ldapSession.write( unbindRequest );
 
-        //LOG.debug( "waiting for unbindFuture" );
         unbindFuture.awaitUninterruptibly( timeout );
-        //LOG.debug( "unbindFuture done" );
 
         authenticated.set( false );
 
@@ -1842,7 +1856,6 @@ public class LdapNetworkConnection exten
         }
         catch ( IOException e )
         {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
 
@@ -1870,6 +1883,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setTimeOut( long timeout )
     {
         if ( timeout <= 0 )
@@ -2116,7 +2130,7 @@ public class LdapNetworkConnection exten
                 break;
 
             case INTERMEDIATE_RESPONSE:
-                IntermediateResponse intermediateResponse = null;
+                IntermediateResponse intermediateResponse;
 
                 if ( responseFuture instanceof SearchFuture )
                 {
@@ -2272,6 +2286,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void modify( Entry entry, ModificationOperation modOp ) throws LdapException
     {
         if ( entry == null )
@@ -2299,6 +2314,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void modify( Dn dn, Modification... modifications ) throws LdapException
     {
         if ( dn == null )
@@ -2331,6 +2347,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void modify( String dn, Modification... modifications ) throws LdapException
     {
         modify( new Dn( dn ), modifications );
@@ -2340,6 +2357,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyResponse modify( ModifyRequest modRequest ) throws LdapException
     {
         if ( modRequest == null )
@@ -2415,6 +2433,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyFuture modifyAsync( ModifyRequest modRequest ) throws LdapException
     {
         if ( modRequest == null )
@@ -2450,6 +2469,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( String entryDn, String newRdn ) throws LdapException
     {
         rename( entryDn, newRdn, true );
@@ -2459,6 +2479,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( Dn entryDn, Rdn newRdn ) throws LdapException
     {
         rename( entryDn, newRdn, true );
@@ -2468,6 +2489,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
     {
         if ( entryDn == null )
@@ -2499,6 +2521,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void rename( Dn entryDn, Rdn newRdn, boolean deleteOldRdn ) throws LdapException
     {
         if ( entryDn == null )
@@ -2529,6 +2552,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void move( String entryDn, String newSuperiorDn ) throws LdapException
     {
         if ( entryDn == null )
@@ -2560,6 +2584,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void move( Dn entryDn, Dn newSuperiorDn ) throws LdapException
     {
         if ( entryDn == null )
@@ -2592,6 +2617,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void moveAndRename( Dn entryDn, Dn newDn ) throws LdapException
     {
         moveAndRename( entryDn, newDn, true );
@@ -2601,6 +2627,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void moveAndRename( String entryDn, String newDn ) throws LdapException
     {
         moveAndRename( new Dn( entryDn ), new Dn( newDn ), true );
@@ -2610,6 +2637,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void moveAndRename( Dn entryDn, Dn newDn, boolean deleteOldRdn ) throws LdapException
     {
         // Check the parameters first
@@ -2660,6 +2688,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void moveAndRename( String entryDn, String newDn, boolean deleteOldRdn ) throws LdapException
     {
         moveAndRename( new Dn( entryDn ), new Dn( newDn ), true );
@@ -2669,6 +2698,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnResponse modifyDn( ModifyDnRequest modDnRequest ) throws LdapException
     {
         if ( modDnRequest == null )
@@ -2738,6 +2768,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ModifyDnFuture modifyDnAsync( ModifyDnRequest modDnRequest ) throws LdapException
     {
         if ( modDnRequest == null )
@@ -2780,6 +2811,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void delete( String dn ) throws LdapException
     {
         delete( new Dn( dn ) );
@@ -2789,6 +2821,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void delete( Dn dn ) throws LdapException
     {
         DeleteRequest deleteRequest = new DeleteRequestImpl();
@@ -2872,6 +2905,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
     {
         if ( deleteRequest == null )
@@ -2941,6 +2975,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public DeleteFuture deleteAsync( DeleteRequest deleteRequest ) throws LdapException
     {
         if ( deleteRequest == null )
@@ -2977,6 +3012,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean compare( String dn, String attributeName, String value ) throws LdapException
     {
         return compare( new Dn( dn ), attributeName, value );
@@ -2986,6 +3022,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean compare( String dn, String attributeName, byte[] value ) throws LdapException
     {
         return compare( new Dn( dn ), attributeName, value );
@@ -2995,6 +3032,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean compare( String dn, String attributeName, Value value ) throws LdapException
     {
         return compare( new Dn( dn ), attributeName, value );
@@ -3004,6 +3042,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean compare( Dn dn, String attributeName, String value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequestImpl();
@@ -3020,6 +3059,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean compare( Dn dn, String attributeName, byte[] value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequestImpl();
@@ -3036,6 +3076,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean compare( Dn dn, String attributeName, Value value ) throws LdapException
     {
         CompareRequest compareRequest = new CompareRequestImpl();
@@ -3060,6 +3101,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareResponse compare( CompareRequest compareRequest ) throws LdapException
     {
         if ( compareRequest == null )
@@ -3129,6 +3171,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public CompareFuture compareAsync( CompareRequest compareRequest ) throws LdapException
     {
         if ( compareRequest == null )
@@ -3165,6 +3208,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedResponse extended( String oid ) throws LdapException
     {
         return extended( oid, null );
@@ -3174,6 +3218,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedResponse extended( String oid, byte[] value ) throws LdapException
     {
         try
@@ -3192,6 +3237,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedResponse extended( Oid oid ) throws LdapException
     {
         return extended( oid, null );
@@ -3201,6 +3247,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedResponse extended( Oid oid, byte[] value ) throws LdapException
     {
         ExtendedRequest extendedRequest =
@@ -3212,6 +3259,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedResponse extended( ExtendedRequest extendedRequest ) throws LdapException
     {
         if ( extendedRequest == null )
@@ -3256,9 +3304,7 @@ public class LdapNetworkConnection exten
             }
 
             // Decode the payload now
-            ExtendedResponseDecorator<?> decoratedResponse = codec.decorate( response );
-
-            return decoratedResponse;
+            return codec.decorate( response );
         }
         catch ( TimeoutException te )
         {
@@ -3291,6 +3337,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public ExtendedFuture extendedAsync( ExtendedRequest extendedRequest ) throws LdapException
     {
         if ( extendedRequest == null )
@@ -3319,6 +3366,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean exists( String dn ) throws LdapException
     {
         return exists( new Dn( dn ) );
@@ -3328,6 +3376,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean exists( Dn dn ) throws LdapException
     {
         try
@@ -3351,6 +3400,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry getRootDse() throws LdapException
     {
         return lookup( Dn.ROOT_DSE, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
@@ -3360,6 +3410,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry getRootDse( String... attributes ) throws LdapException
     {
         return lookup( Dn.ROOT_DSE, attributes );
@@ -3369,6 +3420,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry lookup( Dn dn ) throws LdapException
     {
         return lookup( dn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
@@ -3378,6 +3430,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry lookup( String dn ) throws LdapException
     {
         return lookup( dn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
@@ -3387,6 +3440,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry lookup( Dn dn, String... attributes ) throws LdapException
     {
         return lookup( dn, null, attributes );
@@ -3396,6 +3450,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry lookup( Dn dn, Control[] controls, String... attributes ) throws LdapException
     {
         Entry entry = null;
@@ -3451,6 +3506,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry lookup( String dn, String... attributes ) throws LdapException
     {
         return lookup( new Dn( dn ), null, attributes );
@@ -3460,6 +3516,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry lookup( String dn, Control[] controls, String... attributes ) throws LdapException
     {
         return lookup( new Dn( dn ), controls, attributes );
@@ -3469,6 +3526,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isControlSupported( String controlOID ) throws LdapException
     {
         return getSupportedControls().contains( controlOID );
@@ -3478,6 +3536,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public List<String> getSupportedControls() throws LdapException
     {
         if ( supportedControls != null )
@@ -3490,7 +3549,7 @@ public class LdapNetworkConnection exten
             fetchRootDSE();
         }
 
-        supportedControls = new ArrayList<String>();
+        supportedControls = new ArrayList<>();
 
         Attribute attr = rootDse.get( SchemaConstants.SUPPORTED_CONTROL_AT );
 
@@ -3519,6 +3578,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void loadSchema() throws LdapException
     {
         loadSchema( new DefaultSchemaLoader( this ) );
@@ -3528,6 +3588,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void loadSchemaRelaxed() throws LdapException
     {
         loadSchema( new DefaultSchemaLoader( this, true ) );
@@ -3596,7 +3657,7 @@ public class LdapNetworkConnection exten
             olsp.parse( schemaFile );
 
             Registries registries = schemaManager.getRegistries();
-            List<Throwable> errors = new ArrayList<Throwable>();
+            List<Throwable> errors = new ArrayList<>();
 
             for ( AttributeType atType : olsp.getAttributeTypes() )
             {
@@ -3632,6 +3693,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public LdapApiService getCodecService()
     {
         return codec;
@@ -3641,6 +3703,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public SchemaManager getSchemaManager()
     {
         return schemaManager;
@@ -3702,6 +3765,7 @@ public class LdapNetworkConnection exten
      *
      * @return the configuration of the connection
      */
+    @Override
     public LdapConnectionConfig getConfig()
     {
         return config;
@@ -3751,6 +3815,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean doesFutureExistFor( int messageId )
     {
         ResponseFuture<?> responseFuture = futureMap.get( messageId );
@@ -3767,7 +3832,7 @@ public class LdapNetworkConnection exten
     {
         if ( conCloseListeners == null )
         {
-            conCloseListeners = new ArrayList<ConnectionClosedEventListener>();
+            conCloseListeners = new ArrayList<>();
         }
 
         conCloseListeners.add( ccListener );
@@ -3777,6 +3842,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void inputClosed( IoSession session ) throws Exception 
     {
         session.close( true );
@@ -3789,11 +3855,12 @@ public class LdapNetworkConnection exten
      * 
      * @param session the newly created session
      */
+    @Override
     public void sessionCreated( IoSession session ) throws Exception
     {
         // Last, store the message container
         LdapMessageContainer<? extends MessageDecorator<Message>> ldapMessageContainer =
-            new LdapMessageContainer<MessageDecorator<Message>>(
+            new LdapMessageContainer<>(
                 codec, config.getBinaryAttributeDetector() );
 
         session.setAttribute( LdapDecoder.MESSAGE_CONTAINER_ATTR, ldapMessageContainer );
@@ -3983,12 +4050,12 @@ public class LdapNetworkConnection exten
 
         try
         {
-            BindResponse bindResponse = null;
-            byte[] response = null;
-            ResultCodeEnum result = null;
+            BindResponse bindResponse;
+            byte[] response;
+            ResultCodeEnum result;
 
             // Creating a map for SASL properties
-            Map<String, Object> properties = new HashMap<String, Object>();
+            Map<String, Object> properties = new HashMap<>();
 
             // Quality of Protection SASL property
             if ( saslRequest.getQualityOfProtection() != null )
@@ -4239,6 +4306,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public BinaryAttributeDetector getBinaryAttributeDetector()
     {
         if ( config != null )
@@ -4255,6 +4323,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
+    @Override
     public void setBinaryAttributeDetector( BinaryAttributeDetector binaryAttributeDetector )
     {
         if ( config != null )

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java Wed Jun 15 07:52:34 2016
@@ -114,10 +114,10 @@ import org.apache.directory.api.ldap.sch
 public class LdifAnonymizer
 {
     /** The map that stores the anonymized values associated to the original value */
-    private Map<Value, Value> valueMap = new HashMap<Value, Value>();
+    private Map<Value, Value> valueMap = new HashMap<>();
     
     /** The set that contains all the values we already have anonymized */
-    private Set<Value> valueSet = new HashSet<Value>();
+    private Set<Value> valueSet = new HashSet<>();
     
     /** The latest anonymized String value Map */
     private Map<Integer, String> latestStringMap;
@@ -126,10 +126,10 @@ public class LdifAnonymizer
     private Map<Integer, byte[]> latestBytesMap;
     
     /** The map of AttributeType'sOID we want to anonymize. They are all associated with anonymizers */
-    private Map<String, Anonymizer> attributeAnonymizers = new HashMap<String, Anonymizer>();
+    private Map<String, Anonymizer> attributeAnonymizers = new HashMap<>();
     
     /** The list of existing NamingContexts */
-    private Set<Dn> namingContexts = new HashSet<Dn>();
+    private Set<Dn> namingContexts = new HashSet<>();
 
     /** The schemaManager */
     private SchemaManager schemaManager;
@@ -160,25 +160,27 @@ public class LdifAnonymizer
     
     
     /**
-     * Set the PrintStream to use to print information about the processing
+     * Creates a default instance of LdifAnonymizer. The list of anonymized attribute
+     * is set to a default value.
      * 
-     * @param out The PrintStream to use
+     * @param schemaManager The SchemaManager instance we will use
      */
-    public void setOut( PrintStream out )
+    public LdifAnonymizer( SchemaManager schemaManager )
     {
-        this.out = out;
+        this.schemaManager = schemaManager;
+
+        init( null, null, null, null );
     }
     
     
     /**
-     * Print the string into the PrintStream
+     * Set the PrintStream to use to print information about the processing
+     * 
+     * @param out The PrintStream to use
      */
-    private void print( String str )
+    public void setOut( PrintStream out )
     {
-        if ( out != null )
-        {
-            out.print( str );
-        }
+        this.out = out;
     }
     
     
@@ -207,20 +209,6 @@ public class LdifAnonymizer
     
 
     /**
-     * Creates a default instance of LdifAnonymizer. The list of anonymized attribute
-     * is set to a default value.
-     * 
-     * @param schemaManager The SchemaManager instance we will use
-     */
-    public LdifAnonymizer( SchemaManager schemaManager )
-    {
-        this.schemaManager = schemaManager;
-
-        init( null, null, null, null );
-    }
-    
-    
-    /**
      * Initialize the anonymizer, filling the maps we use.
      */
     private void init( Map<Integer, String> stringLatestValueMap, Map<Integer, byte[]> binaryLatestValueMap, 
@@ -406,7 +394,7 @@ public class LdifAnonymizer
         Value value = ava.getValue();
         AttributeType attributeType = ava.getAttributeType();
         Value anonymizedValue = valueMap.get( value );
-        Ava anonymizedAva = null;
+        Ava anonymizedAva;
         
         if ( anonymizedValue == null )
         {
@@ -507,9 +495,7 @@ public class LdifAnonymizer
             rdnPos--;
         }
         
-        Dn anonymizedDn = new Dn( schemaManager, anonymizedRdns );
-        
-        return anonymizedDn;
+        return new Dn( schemaManager, anonymizedRdns );
     }
 
 
@@ -533,8 +519,8 @@ public class LdifAnonymizer
         
         LdifReader ldifReader = new LdifReader( inputFile, schemaManager );
         int count = 0;
-        List<LdifEntry> errors = new ArrayList<LdifEntry>();
-        List<String> errorTexts = new ArrayList<String>();
+        List<LdifEntry> errors = new ArrayList<>();
+        List<String> errorTexts = new ArrayList<>();
 
         try
         {
@@ -597,59 +583,6 @@ public class LdifAnonymizer
                         }
                     }
 
-                    
-                    /*
-                    Entry entry = ldifEntry.getEntry();
-                    Entry newEntry = new DefaultEntry( schemaManager );
-    
-                    // Process the DN first
-                    Dn entryDn = entry.getDn();
-                    
-                    Dn anonymizedDn = anonymizeDn( entryDn );
-                    
-                    if ( anonymizedDn == null )
-                    {
-                        // Wrong entry base DN
-                        continue;
-                    }
-    
-                    // Now, process the entry
-                    for ( Attribute attribute : entry )
-                    {
-                        AttributeType attributeType = attribute.getAttributeType();
-                        
-                        if ( attributeType.getSyntax().getSyntaxChecker() instanceof DnSyntaxChecker )
-                        {
-                            for ( Value dnValue : attribute )
-                            {
-                                String dnStr = dnValue.getValue();
-                                Dn dn = new Dn( schemaManager, dnStr );
-                                Dn newdDn = anonymizeDn( dn );
-                                newEntry.add( attributeType, newdDn.toString() );
-                            }
-                        }
-                        else
-                        {
-                            Anonymizer anonymizer = attributeAnonymizers.get( attribute.getAttributeType().getOid() );
-        
-                            if ( anonymizer == null )
-                            {
-                                newEntry.add( attribute );
-                            }
-                            else
-                            {
-                                Attribute anonymizedAttribute = anonymizer.anonymize( valueMap, attribute );
-        
-                                newEntry.add( anonymizedAttribute );
-                            }
-                        }
-                    }
-
-                    newEntry.setDn( anonymizedDn );
-                    writer.write( LdifUtils.convertToLdif( newEntry ) );
-                    writer.write( "\n" );
-                    */
-
                     System.out.print( '.' );
                     
                     if ( count % 100  == 0 )
@@ -673,7 +606,7 @@ public class LdifAnonymizer
 
             println();
             
-            if ( errors.size() != 0 )
+            if ( !errors.isEmpty() )
             {
                 println( "There are " + errors.size() + " bad entries" );
                 int i = 0;
@@ -691,7 +624,7 @@ public class LdifAnonymizer
         {
             println();
 
-            if ( errors.size() != 0 )
+            if ( !errors.isEmpty() )
             {
                 println( "There are " + errors.size() + " bad entries" );
             }

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LookupLdapConnectionValidator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LookupLdapConnectionValidator.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LookupLdapConnectionValidator.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LookupLdapConnectionValidator.java Wed Jun 15 07:52:34 2016
@@ -40,6 +40,7 @@ public final class LookupLdapConnectionV
      * @param connection The connection to validate
      * @return True, if the connection is still valid
      */
+    @Override
     public boolean validate( LdapConnection connection )
     {
         try

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/NoVerificationTrustManager.java Wed Jun 15 07:52:34 2016
@@ -45,6 +45,7 @@ public class NoVerificationTrustManager
     /**
      * {@inheritDoc}
      */
+    @Override
     public void checkClientTrusted( X509Certificate[] x509Certificates, String s ) throws CertificateException
     {
         LOG.debug( "checkClientTrusted {}", x509Certificates[0] );
@@ -54,6 +55,7 @@ public class NoVerificationTrustManager
     /**
      * {@inheritDoc}
      */
+    @Override
     public void checkServerTrusted( X509Certificate[] x509Certificates, String s ) throws CertificateException
     {
         LOG.debug( "checkServerTrusted {}", x509Certificates[0] );
@@ -63,6 +65,7 @@ public class NoVerificationTrustManager
     /**
      * {@inheritDoc}
      */
+    @Override
     public X509Certificate[] getAcceptedIssuers()
     {
         return new X509Certificate[0];

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslDigestMd5Request.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslDigestMd5Request.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslDigestMd5Request.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslDigestMd5Request.java Wed Jun 15 07:52:34 2016
@@ -44,6 +44,7 @@ public class SaslDigestMd5Request extend
      * {@inheritDoc}
      */
     // Overriding the visibility of the method to public
+    @Override
     public void setRealmName( String realmName )
     {
         super.setRealmName( realmName );

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslGssApiRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslGssApiRequest.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslGssApiRequest.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslGssApiRequest.java Wed Jun 15 07:52:34 2016
@@ -172,6 +172,7 @@ public class SaslGssApiRequest extends S
      * {@inheritDoc}
      */
     // Overriding the visibility of the method to public
+    @Override
     public void setRealmName( String realmName )
     {
         super.setRealmName( realmName );

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java Wed Jun 15 07:52:34 2016
@@ -43,7 +43,7 @@ public abstract class SaslRequest
     protected String saslMechanism;
 
     /** The list of controls */
-    protected List<Control> controls = new ArrayList<Control>();
+    protected List<Control> controls = new ArrayList<>();
 
     /** The username */
     protected String username;

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java Wed Jun 15 07:52:34 2016
@@ -102,6 +102,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean next() throws LdapException, CursorException
     {
         if ( done )
@@ -150,7 +151,7 @@ public class SearchCursorImpl extends Ab
             throw new LdapConnectionTimeOutException( LdapNetworkConnection.TIME_OUT_ERROR );
         }
 
-        done = ( response instanceof SearchResultDone );
+        done = response instanceof SearchResultDone;
 
         if ( done )
         {
@@ -169,6 +170,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public Response get() throws InvalidCursorPositionException
     {
         if ( !available() )
@@ -183,6 +185,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public SearchResultDone getSearchResultDone()
     {
         return searchDoneResp;
@@ -192,6 +195,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean available()
     {
         return response != null;
@@ -252,6 +256,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public void after( Response element ) throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -263,6 +268,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public void afterLast() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -274,6 +280,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public void before( Response element ) throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -285,6 +292,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public void beforeFirst() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -296,6 +304,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public boolean first() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -307,6 +316,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public boolean last() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -318,6 +328,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
+    @Override
     public boolean previous() throws LdapException, CursorException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION, getClass().getName()
@@ -328,6 +339,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isDone()
     {
         return done;
@@ -337,6 +349,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isReferral()
     {
         return response instanceof SearchResultReference;
@@ -346,6 +359,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public Referral getReferral() throws LdapException
     {
         if ( isReferral() )
@@ -360,6 +374,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isEntry()
     {
         return response instanceof SearchResultEntry;
@@ -369,6 +384,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public Entry getEntry() throws LdapException
     {
         if ( isEntry() )
@@ -389,6 +405,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isIntermediate()
     {
         return response instanceof IntermediateResponse;
@@ -398,6 +415,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
+    @Override
     public IntermediateResponse getIntermediate() throws LdapException
     {
         if ( isEntry() )

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/ValidatingPoolableLdapConnectionFactory.java Wed Jun 15 07:52:34 2016
@@ -123,6 +123,7 @@ public class ValidatingPoolableLdapConne
      * 
      * @throws LdapException If unable to connect.
      */
+    @Override
     public MonitoringLdapConnection makeObject() throws LdapException
     {
         LOG.debug( "Creating a LDAP connection" );
@@ -138,6 +139,7 @@ public class ValidatingPoolableLdapConne
      * 
      * @throws LdapException If unable to reconfigure and rebind.
      */
+    @Override
     public void passivateObject( LdapConnection connection ) throws LdapException
     {
         LOG.debug( "Passivating {}", connection );

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/callback/SaslCallbackHandler.java Wed Jun 15 07:52:34 2016
@@ -66,6 +66,7 @@ public class SaslCallbackHandler impleme
     /**
      * {@inheritDoc}
      */
+    @Override
     public void handle( Callback[] callbacks ) throws IOException, UnsupportedCallbackException
     {
         for ( Callback cb : callbacks )

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java Wed Jun 15 07:52:34 2016
@@ -20,10 +20,6 @@
 package org.apache.directory.ldap.client.api.future;
 
 
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
 import org.apache.directory.api.ldap.model.message.AddResponse;
 import org.apache.directory.ldap.client.api.LdapConnection;
 
@@ -48,26 +44,9 @@ public class AddFuture extends ResponseF
 
 
     /**
-     * Get the AddResponse, blocking until one is received, or until the
-     * given timeout is reached.
-     * 
-     * @param timeout {@inheritDoc}
-     * @param unit {@inheritDoc}
-     * @return the add response
-     * @throws InterruptedException {@inheritDoc}
-     * @throws ExecutionException {@inheritDoc}
-     * @throws TimeoutException {@inheritDoc}
-     */
-    public AddResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
-        TimeoutException
-    {
-        return super.get( timeout, unit );
-    }
-
-
-    /**
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java?rev=1748510&r1=1748509&r2=1748510&view=diff
==============================================================================
--- directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java (original)
+++ directory/shared/branches/shared-value/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java Wed Jun 15 07:52:34 2016
@@ -20,10 +20,6 @@
 package org.apache.directory.ldap.client.api.future;
 
 
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
 import org.apache.directory.api.ldap.model.message.BindResponse;
 import org.apache.directory.ldap.client.api.LdapConnection;
 
@@ -48,26 +44,9 @@ public class BindFuture extends Response
 
 
     /**
-     * Get the BindResponse, blocking until one is received, or until the
-     * given timeout is reached.
-     * 
-     * @param timeout {@inheritDoc}
-     * @param unit {@inheritDoc}
-     * @return the bind response
-     * @throws InterruptedException {@inheritDoc}
-     * @throws ExecutionException {@inheritDoc}
-     * @throws TimeoutException {@inheritDoc}
-     */
-    public BindResponse get( long timeout, TimeUnit unit ) throws InterruptedException, ExecutionException,
-        TimeoutException
-    {
-        return super.get( timeout, unit );
-    }
-
-
-    /**
      * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder();