directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1701691 - in /directory/apacheds/trunk: protocol-ldap/src/checkstyle/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ protocol-ldap/src/main/java/org/apac...
Date Mon, 07 Sep 2015 20:33:14 GMT
Author: seelmann
Date: Mon Sep  7 20:33:14 2015
New Revision: 1701691

URL: http://svn.apache.org/r1701691
Log:
Fix checkstyle issues

Added:
    directory/apacheds/trunk/protocol-ldap/src/checkstyle/
    directory/apacheds/trunk/protocol-ldap/src/checkstyle/suppressions.xml   (with props)
Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/PwdModifyHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/ModifyDnRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/response/SearchResultDoneHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslConstants.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslFilter.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/ntlm/NtlmSaslServer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationTrustManager.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/PingerThread.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java
    directory/apacheds/trunk/protocol-ntp/src/checkstyle/suppressions.xml

Added: directory/apacheds/trunk/protocol-ldap/src/checkstyle/suppressions.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/checkstyle/suppressions.xml?rev=1701691&view=auto
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/checkstyle/suppressions.xml (added)
+++ directory/apacheds/trunk/protocol-ldap/src/checkstyle/suppressions.xml Mon Sep  7 20:33:14 2015
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<!DOCTYPE suppressions PUBLIC
+    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+
+<suppressions>
+    <!-- More than 7 parameters in private method -->
+    <suppress files="org.apache.directory.server.ldap.handlers.request.SearchRequestHandler" checks="ParameterNumber"/>
+</suppressions>

Propchange: directory/apacheds/trunk/protocol-ldap/src/checkstyle/suppressions.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/protocol-ldap/src/checkstyle/suppressions.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolHandler.java Mon Sep  7 20:33:14 2015
@@ -35,7 +35,6 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.ldap.model.message.ResultResponseRequest;
 import org.apache.directory.api.ldap.model.message.extended.NoticeOfDisconnect;
 import org.apache.mina.core.buffer.IoBuffer;
-import org.apache.mina.core.service.IoHandler;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.ssl.SslFilter;
 import org.apache.mina.handler.demux.DemuxingIoHandler;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolUtils.java Mon Sep  7 20:33:14 2015
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapProtocolUtils
+public final class LdapProtocolUtils
 {
     /** A delimiter for the replicaId */
     public static final String COOKIE_DELIM = ",";
@@ -53,6 +53,11 @@ public class LdapProtocolUtils
     private static final Logger LOG = LoggerFactory.getLogger( LdapProtocolUtils.class );
 
 
+    private LdapProtocolUtils()
+    {
+    }
+
+
     /**
      * Extracts request controls from a request to populate into an
      * OperationContext.

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java Mon Sep  7 20:33:14 2015
@@ -148,8 +148,7 @@ public class LdapSession
      */
     public boolean isAuthPending()
     {
-        return ( bindStatus == BindStatus.SIMPLE_AUTH_PENDING ) ||
-            ( bindStatus == BindStatus.SASL_AUTH_PENDING );
+        return ( bindStatus == BindStatus.SIMPLE_AUTH_PENDING ) || ( bindStatus == BindStatus.SASL_AUTH_PENDING );
     }
 
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/PersistentSearchListener.java Mon Sep  7 20:33:14 2015
@@ -262,7 +262,7 @@ public class PersistentSearchListener im
         {
             ServerEntryUtils.filterContents( schemaManager, filterCtx, entry );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
             // shouldn't happen, if it does then blow up
             throw new RuntimeException( e );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/controls/PagedSearchContext.java Mon Sep  7 20:33:14 2015
@@ -130,9 +130,9 @@ public class PagedSearchContext
             catch ( LdapException le )
             {
                 // Deal with special attributes : '*', '+' and '1.1'
-                if ( attribute.equals( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) ||
-                    attribute.equals( SchemaConstants.ALL_USER_ATTRIBUTES ) ||
-                    attribute.equals( SchemaConstants.NO_ATTRIBUTE ) )
+                if ( attribute.equals( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES )
+                    || attribute.equals( SchemaConstants.ALL_USER_ATTRIBUTES )
+                    || attribute.equals( SchemaConstants.NO_ATTRIBUTE ) )
                 {
                     requestSet.add( attribute );
                 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/PwdModifyHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/PwdModifyHandler.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/PwdModifyHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/PwdModifyHandler.java Mon Sep  7 20:33:14 2015
@@ -110,10 +110,10 @@ public class PwdModifyHandler implements
             Attribute at = userEntry.get( SchemaConstants.USER_PASSWORD_AT );
             if ( ( oldPassword != null ) && ( at != null ) )
             {
-                for( Value<?> v : at )
+                for ( Value<?> v : at )
                 {
                     boolean equal = PasswordUtil.compareCredentials( oldPassword, v.getBytes() );
-                    if( equal )
+                    if ( equal )
                     {
                         oldPassword = v.getBytes();
                     }
@@ -136,7 +136,7 @@ public class PwdModifyHandler implements
         modifyRequest.setName( userDn );
 
         Control ppolicyControl = req.getControl( PasswordPolicy.OID );
-        if( ppolicyControl != null )
+        if ( ppolicyControl != null )
         {
             modifyRequest.addControl( ppolicyControl );
         }
@@ -195,7 +195,7 @@ public class PwdModifyHandler implements
 
             ppolicyControl = modifyRequest.getResultResponse().getControl( PasswordPolicy.OID );
 
-            if( ppolicyControl != null )
+            if ( ppolicyControl != null )
             {
                 pmrl.addControl( ppolicyControl );
             }
@@ -224,7 +224,7 @@ public class PwdModifyHandler implements
 
         ppolicyControl = modifyRequest.getResultResponse().getControl( PasswordPolicy.OID );
 
-        if( ppolicyControl != null )
+        if ( ppolicyControl != null )
         {
             errorPmrl.addControl( ppolicyControl );
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/ModifyDnRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/ModifyDnRequestHandler.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/ModifyDnRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/ModifyDnRequestHandler.java Mon Sep  7 20:33:14 2015
@@ -80,8 +80,7 @@ public class ModifyDnRequestHandler exte
 
             Dn oldRdn = new Dn( schemaManager, req.getName().getRdn().getName() );
 
-            boolean rdnChanged = req.getNewRdn() != null &&
-                !newRdn.getNormName().equals( oldRdn.getNormName() );
+            boolean rdnChanged = req.getNewRdn() != null && !newRdn.getNormName().equals( oldRdn.getNormName() );
 
             CoreSession coreSession = session.getCoreSession();
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/request/SearchRequestHandler.java Mon Sep  7 20:33:14 2015
@@ -71,7 +71,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.event.EventType;
 import org.apache.directory.server.core.api.event.NotificationCriteria;
-import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.api.partition.PartitionNexus;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
@@ -263,38 +262,32 @@ public class SearchRequestHandler extend
      */
     private void handleLookup( LdapSession session, SearchRequest req ) throws Exception
     {
-        try
-        {
-            Map<String, Control> controlMap = req.getControls();
-            Control[] controls = null;
+        Map<String, Control> controlMap = req.getControls();
+        Control[] controls = null;
 
-            if ( controlMap != null )
-            {
-                Collection<Control> controlValues = controlMap.values();
+        if ( controlMap != null )
+        {
+            Collection<Control> controlValues = controlMap.values();
 
-                controls = new Control[controlValues.size()];
-                int pos = 0;
+            controls = new Control[controlValues.size()];
+            int pos = 0;
 
-                for ( Control control : controlMap.values() )
-                {
-                    controls[pos++] = control;
-                }
+            for ( Control control : controlMap.values() )
+            {
+                controls[pos++] = control;
             }
+        }
 
-            Entry entry = session.getCoreSession().lookup(
-                req.getBase(),
-                controls,
-                req.getAttributes().toArray( new String[]
-                    {} ) );
+        Entry entry = session.getCoreSession().lookup(
+            req.getBase(),
+            controls,
+            req.getAttributes().toArray( new String[]
+                {} ) );
 
-            session.getIoSession().write( generateResponse( session, req, entry ) );
+        session.getIoSession().write( generateResponse( session, req, entry ) );
 
-            // write the SearchResultDone message
-            session.getIoSession().write( req.getResultResponse() );
-        }
-        finally
-        {
-        }
+        // write the SearchResultDone message
+        session.getIoSession().write( req.getResultResponse() );
     }
 
 
@@ -1182,7 +1175,8 @@ public class SearchRequestHandler extend
             if ( isLogSearchTime )
             {
                 long t1 = System.nanoTime();
-                SEARCH_TIME_LOG.debug( "Search with filter {} took {}ms. Filter with assigned counts is {}", filter, ((t1-t0)/1000000), req.getFilter() );
+                SEARCH_TIME_LOG.debug( "Search with filter {} took {}ms. Filter with assigned counts is {}", filter,
+                    ( ( t1 - t0 ) / 1000000 ), req.getFilter() );
             }
         }
         catch ( Exception e )

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/response/SearchResultDoneHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/response/SearchResultDoneHandler.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/response/SearchResultDoneHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/response/SearchResultDoneHandler.java Mon Sep  7 20:33:14 2015
@@ -40,15 +40,9 @@ public class SearchResultDoneHandler ext
     {
         LOG.debug( "Message Sent : {}", searchResultDone );
         SearchRequestContainer searchRequestContainer = session.getSearchRequest( searchResultDone.getMessageId() );
-        
-        if ( searchRequestContainer == null )
+
+        if ( searchRequestContainer != null )
         {
-            // We have had an exception
-            //System.out.println( "SearchResultDone : " + searchResultDone );
-        }
-        else
-        {
-            //System.out.println( "SearchResultDone : " + searchRequestContainer );
             // Unregister the request from the session
             session.unregisterSearchRequest( searchRequestContainer.getSearchRequest() );
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslConstants.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslConstants.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslConstants.java Mon Sep  7 20:33:14 2015
@@ -27,7 +27,7 @@ package org.apache.directory.server.ldap
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SaslConstants
+public final class SaslConstants
 {
     /**
      * A key constant for storing the SASL Server in the session.
@@ -88,4 +88,9 @@ public class SaslConstants
      * A key constant representing the SASL IoFilter 
      */
     public static final String SASL_FILTER = "SASL_FILTER";
+
+
+    private SaslConstants()
+    {
+    }
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslFilter.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslFilter.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/SaslFilter.java Mon Sep  7 20:33:14 2015
@@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory;
  */
 public class SaslFilter extends IoFilterAdapter
 {
-    private static final Logger log = LoggerFactory.getLogger( SaslFilter.class );
+    private static final Logger LOG = LoggerFactory.getLogger( SaslFilter.class );
 
     /**
      * A session attribute key that makes next one write request bypass
@@ -83,7 +83,7 @@ public class SaslFilter extends IoFilter
 
     public void messageReceived( NextFilter nextFilter, IoSession session, Object message ) throws SaslException
     {
-        log.debug( "Message received:  {}", message );
+        LOG.debug( "Message received:  {}", message );
 
         /*
          * Unwrap the data for mechanisms that support QoP (DIGEST-MD5, GSSAPI).
@@ -102,13 +102,13 @@ public class SaslFilter extends IoFilter
             byte[] bufferBytes = new byte[bufferLength];
             buf.get( bufferBytes );
 
-            log.debug( "Will use SASL to unwrap received message of length:  {}", bufferLength );
+            LOG.debug( "Will use SASL to unwrap received message of length:  {}", bufferLength );
             byte[] token = saslServer.unwrap( bufferBytes, 0, bufferBytes.length );
             nextFilter.messageReceived( session, IoBuffer.wrap( token ) );
         }
         else
         {
-            log.debug( "Will not use SASL on received message." );
+            LOG.debug( "Will not use SASL on received message." );
             nextFilter.messageReceived( session, message );
         }
     }
@@ -116,7 +116,7 @@ public class SaslFilter extends IoFilter
 
     public void filterWrite( NextFilter nextFilter, IoSession session, WriteRequest writeRequest ) throws SaslException
     {
-        log.debug( "Filtering write request:  {}", writeRequest );
+        LOG.debug( "Filtering write request:  {}", writeRequest );
 
         /*
          * Check if security layer processing should be disabled once.
@@ -124,7 +124,7 @@ public class SaslFilter extends IoFilter
         if ( session.containsAttribute( DISABLE_SECURITY_LAYER_ONCE ) )
         {
             // Remove the marker attribute because it is temporary.
-            log.debug( "Disabling SaslFilter once; will not use SASL on write request." );
+            LOG.debug( "Disabling SaslFilter once; will not use SASL on write request." );
             session.removeAttribute( DISABLE_SECURITY_LAYER_ONCE );
             nextFilter.filterWrite( session, writeRequest );
             return;
@@ -149,7 +149,7 @@ public class SaslFilter extends IoFilter
             byte[] bufferBytes = new byte[bufferLength];
             buf.get( bufferBytes );
 
-            log.debug( "Will use SASL to wrap message of length:  {}", bufferLength );
+            LOG.debug( "Will use SASL to wrap message of length:  {}", bufferLength );
 
             byte[] saslLayer = saslServer.wrap( bufferBytes, 0, bufferBytes.length );
 
@@ -162,12 +162,12 @@ public class SaslFilter extends IoFilter
             saslLayerBuffer.position( 0 );
             saslLayerBuffer.limit( 4 + saslLayer.length );
 
-            log.debug( "Sending encrypted token of length {}.", saslLayerBuffer.limit() );
+            LOG.debug( "Sending encrypted token of length {}.", saslLayerBuffer.limit() );
             nextFilter.filterWrite( session, new DefaultWriteRequest( saslLayerBuffer, writeRequest.getFuture() ) );
         }
         else
         {
-            log.debug( "Will not use SASL on write request." );
+            LOG.debug( "Will not use SASL on write request." );
             nextFilter.filterWrite( session, writeRequest );
         }
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/ntlm/NtlmSaslServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/ntlm/NtlmSaslServer.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/ntlm/NtlmSaslServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/ntlm/NtlmSaslServer.java Mon Sep  7 20:33:14 2015
@@ -95,6 +95,9 @@ public class NtlmSaslServer extends Abst
 
             case COMPLETED:
                 throw new IllegalStateException( I18n.err( I18n.ERR_662 ) );
+
+            default:
+                throw new IllegalStateException( "Unexpected negotiation state " + state );
         }
     }
 
@@ -119,6 +122,9 @@ public class NtlmSaslServer extends Abst
 
             case COMPLETED:
                 throw new IllegalStateException( I18n.err( I18n.ERR_662 ) );
+
+            default:
+                throw new IllegalStateException( "Unexpected negotiation state " + state );
         }
     }
 
@@ -180,6 +186,12 @@ public class NtlmSaslServer extends Abst
                 }
 
                 break;
+
+            case INITIALIZED:
+            case TYPE_2_SENT:
+            case COMPLETED:
+            default:
+                throw new IllegalStateException( "Unexpected negotiation state " + state );
         }
 
         responseSent();

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java Mon Sep  7 20:33:14 2015
@@ -43,8 +43,13 @@ import org.apache.mina.filter.ssl.SslFil
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  *
  */
-public class LdapsInitializer
+public final class LdapsInitializer
 {
+    private LdapsInitializer()
+    {
+    }
+
+
     /**
      * Initialize the LDAPS server.
      *

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationTrustManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationTrustManager.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationTrustManager.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationTrustManager.java Mon Sep  7 20:33:14 2015
@@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ReplicationTrustManager implements X509TrustManager
+public final class ReplicationTrustManager implements X509TrustManager
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( ReplicationTrustManager.class );
@@ -63,7 +63,7 @@ public class ReplicationTrustManager imp
     private static X509CertParser parser = new X509CertParser();
 
     /** the singleton instance of this trust manager */
-    private static ReplicationTrustManager INSTANCE = new ReplicationTrustManager();
+    private static final ReplicationTrustManager INSTANCE = new ReplicationTrustManager();
 
 
     /**
@@ -79,7 +79,7 @@ public class ReplicationTrustManager imp
             TrustManagerFactory tmFactory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm() );
             tmFactory.init( ks );
 
-            TrustManager trustManagers[] = tmFactory.getTrustManagers();
+            TrustManager[] trustManagers = tmFactory.getTrustManagers();
 
             for ( int i = 0; i < trustManagers.length; i++ )
             {

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/PingerThread.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/PingerThread.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/PingerThread.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/PingerThread.java Mon Sep  7 20:33:14 2015
@@ -55,7 +55,7 @@ public class PingerThread extends Thread
      */
     public PingerThread( int sleepSec )
     {
-        if( sleepSec > 0 )
+        if ( sleepSec > 0 )
         {
             sleepTime = sleepSec * 1000;
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java Mon Sep  7 20:33:14 2015
@@ -28,7 +28,6 @@ import java.util.Map;
 
 import org.apache.commons.collections.map.LRUMap;
 import org.apache.directory.api.ldap.codec.controls.manageDsaIT.ManageDsaITDecorator;
-import org.apache.directory.api.ldap.extras.controls.SyncModifyDnType;
 import org.apache.directory.api.ldap.extras.controls.SynchronizationModeEnum;
 import org.apache.directory.api.ldap.extras.controls.syncrepl.syncDone.SyncDoneValue;
 import org.apache.directory.api.ldap.extras.controls.syncrepl.syncInfoValue.SyncInfoValue;
@@ -160,7 +159,7 @@ public class ReplicationConsumerImpl imp
     private static AttributeType ENTRY_UUID_AT;
     private static AttributeType RID_AT_TYPE;
 
-    private static final Map<String, Object> uuidLockMap = new LRUMap( 1000 );
+    private static final Map<String, Object> UUID_LOCK_MAP = new LRUMap( 1000 );
 
 
     /**
@@ -446,6 +445,9 @@ public class ReplicationConsumerImpl imp
                     case PRESENT:
                         CONSUMER_LOG.debug( "entry present {}", remoteEntry );
                         break;
+
+                    default:
+                        throw new IllegalArgumentException( "Unexpected sync state " + state );
                 }
 
                 // store the cookie only if the above operation was successful
@@ -1013,9 +1015,6 @@ public class ReplicationConsumerImpl imp
     {
         CONSUMER_LOG.debug( "MODDN for entry {}, new entry : {}", entryUuid, remoteEntry );
 
-        // First, compute the MODDN type
-        SyncModifyDnType modDnType = null;
-
         try
         {
             // Retrieve locally the moved or renamed entry
@@ -1069,64 +1068,45 @@ public class ReplicationConsumerImpl imp
             Rdn localRdn = localDn.getRdn();
             Rdn remoteRdn = directoryService.getDnFactory().create( remoteDn.getRdn().getName() ).getRdn();
 
+            // Check if the OldRdn has been deleted
+            boolean deleteOldRdn = !remoteEntry.contains( localRdn.getNormType(), localRdn.getNormValue() );
+
             if ( localRdn.equals( remoteRdn ) )
             {
                 // If the RDN are equals, it's a MOVE
-                modDnType = SyncModifyDnType.MOVE;
+                CONSUMER_LOG.debug( "moving {} to the new parent {}", localDn, remoteParentDn );
+                MoveOperationContext movCtx = new MoveOperationContext( session, localDn, remoteParentDn );
+                movCtx.setReplEvent( true );
+                movCtx.setRid( rid );
+                directoryService.getOperationManager().move( movCtx );
             }
             else if ( localParentDn.equals( remoteParentDn ) )
             {
                 // If the parentDn are equals, it's a RENAME
-                modDnType = SyncModifyDnType.RENAME;
+                CONSUMER_LOG.debug( "renaming the Dn {} with new Rdn {} and deleteOldRdn flag set to {}",
+                    localDn.getName(), remoteRdn.getName(), String.valueOf( deleteOldRdn ) );
+                
+                RenameOperationContext renCtx = new RenameOperationContext( session, localDn, remoteRdn,
+                    deleteOldRdn );
+                renCtx.setReplEvent( true );
+                renCtx.setRid( rid );
+                directoryService.getOperationManager().rename( renCtx );
             }
             else
             {
                 // Otherwise, it's a MOVE and RENAME
-                modDnType = SyncModifyDnType.MOVE_AND_RENAME;
-            }
-
-            // Check if the OldRdn has been deleted
-            boolean deleteOldRdn = !remoteEntry.contains( localRdn.getNormType(), localRdn.getNormValue() );
-
-            switch ( modDnType )
-            {
-                case MOVE:
-                    CONSUMER_LOG.debug( "moving {} to the new parent {}", localDn, remoteParentDn );
-                    MoveOperationContext movCtx = new MoveOperationContext( session, localDn, remoteParentDn );
-                    movCtx.setReplEvent( true );
-                    movCtx.setRid( rid );
-                    directoryService.getOperationManager().move( movCtx );
-
-                    break;
-
-                case RENAME:
-                    CONSUMER_LOG.debug( "renaming the Dn {} with new Rdn {} and deleteOldRdn flag set to {}",
-                        localDn.getName(), remoteRdn.getName(), String.valueOf( deleteOldRdn ) );
-
-                    RenameOperationContext renCtx = new RenameOperationContext( session, localDn, remoteRdn,
-                        deleteOldRdn );
-                    renCtx.setReplEvent( true );
-                    renCtx.setRid( rid );
-                    directoryService.getOperationManager().rename( renCtx );
-
-                    break;
-
-                case MOVE_AND_RENAME:
-                    CONSUMER_LOG
-                        .debug(
-                            "moveAndRename on the Dn {} with new newParent Dn {}, new Rdn {} and deleteOldRdn flag set to {}",
-                            localDn.getName(),
-                            remoteParentDn.getName(),
-                            remoteRdn.getName(),
-                            String.valueOf( deleteOldRdn ) );
-
-                    MoveAndRenameOperationContext movRenCtx = new MoveAndRenameOperationContext( session, localDn,
-                        remoteParentDn, remoteRdn, deleteOldRdn );
-                    movRenCtx.setReplEvent( true );
-                    movRenCtx.setRid( rid );
-                    directoryService.getOperationManager().moveAndRename( movRenCtx );
-
-                    break;
+                CONSUMER_LOG.debug(
+                    "moveAndRename on the Dn {} with new newParent Dn {}, new Rdn {} and deleteOldRdn flag set to {}",
+                    localDn.getName(),
+                    remoteParentDn.getName(),
+                    remoteRdn.getName(),
+                    String.valueOf( deleteOldRdn ) );
+                
+                MoveAndRenameOperationContext movRenCtx = new MoveAndRenameOperationContext( session, localDn,
+                    remoteParentDn, remoteRdn, deleteOldRdn );
+                movRenCtx.setReplEvent( true );
+                movRenCtx.setRid( rid );
+                directoryService.getOperationManager().moveAndRename( movRenCtx );
             }
         }
         catch ( Exception e )
@@ -1274,24 +1254,24 @@ public class ReplicationConsumerImpl imp
             return;
         }
 
-        int NODE_LIMIT = 10;
+        int nodeLimit = 10;
 
-        int count = uuidList.size() / NODE_LIMIT;
+        int count = uuidList.size() / nodeLimit;
 
         int startIndex = 0;
         int i = 0;
         for ( ; i < count; i++ )
         {
-            startIndex = i * NODE_LIMIT;
-            processDelete( uuidList.subList( startIndex, startIndex + NODE_LIMIT ), isRefreshPresent, replicaId );
+            startIndex = i * nodeLimit;
+            processDelete( uuidList.subList( startIndex, startIndex + nodeLimit ), isRefreshPresent, replicaId );
         }
 
-        if ( ( uuidList.size() % NODE_LIMIT ) != 0 )
+        if ( ( uuidList.size() % nodeLimit ) != 0 )
         {
             // remove the remaining entries
             if ( count > 0 )
             {
-                startIndex = i * NODE_LIMIT;
+                startIndex = i * nodeLimit;
             }
 
             processDelete( uuidList.subList( startIndex, uuidList.size() ), isRefreshPresent, replicaId );
@@ -1398,12 +1378,12 @@ public class ReplicationConsumerImpl imp
 
     private synchronized Object getLockFor( String uuid )
     {
-        Object lock = uuidLockMap.get( uuid );
+        Object lock = UUID_LOCK_MAP.get( uuid );
 
         if ( lock == null )
         {
             lock = new Object();
-            uuidLockMap.put( uuid, lock );
+            UUID_LOCK_MAP.put( uuid, lock );
         }
 
         return lock;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplConsumerManager.java Mon Sep  7 20:33:14 2015
@@ -81,7 +81,7 @@ public class ReplConsumerManager
 
     /** The replication factory DN */
     private static final String REPL_CONSUMER_DN_STR = "ou=consumers,ou=system";
-    private static Dn REPL_CONSUMER_DN;
+    private Dn replConsumerDn;
 
     /** The consumers' ou value */
     private static final String CONSUMERS = "consumers";
@@ -107,7 +107,7 @@ public class ReplConsumerManager
         this.directoryService = directoryService;
         adminSession = directoryService.getAdminSession();
         schemaManager = directoryService.getSchemaManager();
-        REPL_CONSUMER_DN = directoryService.getDnFactory().create( REPL_CONSUMER_DN_STR );
+        replConsumerDn = directoryService.getDnFactory().create( REPL_CONSUMER_DN_STR );
         OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
         ADS_REPL_LAST_SENT_CSN_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.ADS_REPL_LAST_SENT_CSN );
 
@@ -121,13 +121,13 @@ public class ReplConsumerManager
      */
     private void createConsumersBranch() throws Exception
     {
-        if ( !adminSession.exists( REPL_CONSUMER_DN ) )
+        if ( !adminSession.exists( replConsumerDn ) )
         {
             LOG.debug( "creating the entry for storing replication consumers' details" );
             PROVIDER_LOG
-                .debug( "Creating the entry for storing replication consumers' details in {}", REPL_CONSUMER_DN );
+                .debug( "Creating the entry for storing replication consumers' details in {}", replConsumerDn );
 
-            Entry entry = new DefaultEntry( schemaManager, REPL_CONSUMER_DN,
+            Entry entry = new DefaultEntry( schemaManager, replConsumerDn,
                 SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.ORGANIZATIONAL_UNIT_OC,
                 SchemaConstants.OU_AT, CONSUMERS );
 
@@ -154,7 +154,7 @@ public class ReplConsumerManager
 
         // Check that we don't already have an entry for this consumer
         Dn consumerDn = directoryService.getDnFactory().create(
-            SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + REPL_CONSUMER_DN );
+            SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + replConsumerDn );
 
         if ( adminSession.exists( consumerDn ) )
         {
@@ -202,7 +202,7 @@ public class ReplConsumerManager
 
         // Check that we have an entry for this consumer
         Dn consumerDn = directoryService.getDnFactory().create(
-            SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + REPL_CONSUMER_DN );
+            SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + replConsumerDn );
 
         PROVIDER_LOG.debug( "Trying to delete the consumer entry {}", consumerDn );
 
@@ -248,7 +248,7 @@ public class ReplConsumerManager
         }
 
         Dn dn = directoryService.getDnFactory().create(
-            SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + REPL_CONSUMER_DN );
+            SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + replConsumerDn );
         adminSession.modify( dn, mod );
 
         LOG.debug( "updated last sent CSN of consumer entry {}", dn );
@@ -270,7 +270,7 @@ public class ReplConsumerManager
         ExprNode filter = new EqualityNode<String>( OBJECT_CLASS_AT, new StringValue(
             SchemaConstants.ADS_REPL_EVENT_LOG ) );
         SearchRequest searchRequest = new SearchRequestImpl();
-        searchRequest.setBase( REPL_CONSUMER_DN );
+        searchRequest.setBase( replConsumerDn );
         searchRequest.setScope( SearchScope.ONELEVEL );
         searchRequest.setFilter( filter );
         searchRequest.addAttributes( SchemaConstants.ALL_ATTRIBUTES_ARRAY );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java Mon Sep  7 20:33:14 2015
@@ -130,10 +130,10 @@ public class SyncReplRequestHandler impl
     protected LdapServer ldapServer;
 
     /** An ObjectClass AT instance */
-    private static AttributeType OBJECT_CLASS_AT;
+    private AttributeType objectClassAT;
 
     /** The CSN AttributeType instance */
-    private AttributeType CSN_AT;
+    private AttributeType csnAT;
 
     private Map<Integer, ReplicaEventLog> replicaLogMap = new ConcurrentHashMap<Integer, ReplicaEventLog>();
 
@@ -147,9 +147,9 @@ public class SyncReplRequestHandler impl
 
     private ReplicaEventLogJanitor logJanitor;
 
-    private AttributeType REPL_LOG_MAX_IDLE_AT;
+    private AttributeType replLogMaxIdleAT;
 
-    private AttributeType REPL_LOG_PURGE_THRESHOLD_COUNT_AT;
+    private AttributeType replLogPurgeThresholdCountAT;
 
     /** thread used for updating consumer infor */
     private Thread consumerInfoUpdateThread;
@@ -182,16 +182,16 @@ public class SyncReplRequestHandler impl
             this.ldapServer = server;
             this.dirService = server.getDirectoryService();
 
-            CSN_AT = dirService.getSchemaManager()
+            csnAT = dirService.getSchemaManager()
                 .lookupAttributeTypeRegistry( SchemaConstants.ENTRY_CSN_AT );
 
-            OBJECT_CLASS_AT = dirService.getSchemaManager()
+            objectClassAT = dirService.getSchemaManager()
                 .lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
 
-            REPL_LOG_MAX_IDLE_AT = dirService.getSchemaManager()
+            replLogMaxIdleAT = dirService.getSchemaManager()
                 .lookupAttributeTypeRegistry( SchemaConstants.ADS_REPL_LOG_MAX_IDLE );
 
-            REPL_LOG_PURGE_THRESHOLD_COUNT_AT = dirService.getSchemaManager()
+            replLogPurgeThresholdCountAT = dirService.getSchemaManager()
                 .lookupAttributeTypeRegistry( SchemaConstants.ADS_REPL_LOG_PURGE_THRESHOLD_COUNT );
 
             // Get and create the replication directory if it does not exist
@@ -381,13 +381,13 @@ public class SyncReplRequestHandler impl
                 Entry entry = replicaEventMessage.getEntry();
                 PROVIDER_LOG.debug( "Read message from the queue {}", entry );
 
-                lastSentCsn = entry.get( CSN_AT ).getString();
+                lastSentCsn = entry.get( csnAT ).getString();
 
-                ChangeType event = replicaEventMessage.getChangeType();
+                ChangeType changeType = replicaEventMessage.getChangeType();
 
                 SyncStateTypeEnum syncStateType = null;
 
-                switch ( event )
+                switch ( changeType )
                 {
                     case ADD:
                         syncStateType = SyncStateTypeEnum.ADD;
@@ -404,6 +404,9 @@ public class SyncReplRequestHandler impl
                     case DELETE:
                         syncStateType = SyncStateTypeEnum.DELETE;
                         break;
+
+                    default:
+                        throw new IllegalStateException( I18n.err( I18n.ERR_686 ) );
                 }
 
                 sendSearchResultEntry( session, req, entry, syncStateType );
@@ -532,7 +535,7 @@ public class SyncReplRequestHandler impl
         StringValue contexCsnValue = new StringValue( contextCsn );
 
         // modify the filter to include the context Csn
-        GreaterEqNode csnGeNode = new GreaterEqNode( CSN_AT, contexCsnValue );
+        GreaterEqNode csnGeNode = new GreaterEqNode( csnAT, contexCsnValue );
         ExprNode postInitContentFilter = new AndNode( modifiedFilter, csnGeNode );
         request.setFilter( postInitContentFilter );
 
@@ -560,7 +563,7 @@ public class SyncReplRequestHandler impl
         dirService.getEventService().addListener( replicationListener, criteria );
 
         // then start pushing initial content
-        LessEqNode csnNode = new LessEqNode( CSN_AT, contexCsnValue );
+        LessEqNode csnNode = new LessEqNode( csnAT, contexCsnValue );
 
         // modify the filter to include the context Csn
         ExprNode initialContentFilter = new AndNode( modifiedFilter, csnNode );
@@ -729,7 +732,7 @@ public class SyncReplRequestHandler impl
 
             sendSearchResultEntry( session, req, entry, SyncStateTypeEnum.ADD );
 
-            String lastSentCsn = entry.get( CSN_AT ).getString();
+            String lastSentCsn = entry.get( csnAT ).getString();
             replicaLog.setLastSentCsn( lastSentCsn );
 
             count++;
@@ -981,7 +984,7 @@ public class SyncReplRequestHandler impl
     private EqualityNode<String> newIsReferralEqualityNode( LdapSession session ) throws Exception
     {
         EqualityNode<String> ocIsReferral = new EqualityNode<String>( SchemaConstants.OBJECT_CLASS_AT, new StringValue(
-            OBJECT_CLASS_AT, SchemaConstants.REFERRAL_OC ) );
+            objectClassAT, SchemaConstants.REFERRAL_OC ) );
 
         return ocIsReferral;
     }
@@ -1246,7 +1249,7 @@ public class SyncReplRequestHandler impl
                     {
                         Attribute at = m.getAttribute();
 
-                        if ( at.isInstanceOf( REPL_LOG_MAX_IDLE_AT ) )
+                        if ( at.isInstanceOf( replLogMaxIdleAT ) )
                         {
                             ReplicaEventLog log = getEventLog( modifyContext );
                             if ( log != null )
@@ -1255,7 +1258,7 @@ public class SyncReplRequestHandler impl
                                 log.setMaxIdlePeriod( maxIdlePeriod );
                             }
                         }
-                        else if ( at.isInstanceOf( REPL_LOG_PURGE_THRESHOLD_COUNT_AT ) )
+                        else if ( at.isInstanceOf( replLogPurgeThresholdCountAT ) )
                         {
                             ReplicaEventLog log = getEventLog( modifyContext );
                             if ( log != null )

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplSearchListener.java Mon Sep  7 20:33:14 2015
@@ -260,7 +260,7 @@ public class SyncReplSearchListener impl
             return;
         }
         
-        sendDeletedEntry( ((ClonedServerEntry)entry).getClonedEntry() );
+        sendDeletedEntry( ( ( ClonedServerEntry ) entry ).getClonedEntry() );
     }
     
 
@@ -523,7 +523,7 @@ public class SyncReplSearchListener impl
                 // if successful update the last sent CSN
                 consumerMsgLog.setLastSentCsn( entry.get( SchemaConstants.ENTRY_CSN_AT ).getString() );
             }
-            catch( Exception e )
+            catch ( Exception e )
             {
                 //should never happen
                 LOG.error( "No entry CSN attribute found", e );
@@ -546,15 +546,15 @@ public class SyncReplSearchListener impl
         
         String name = Strings.toLowerCase( entry.getDn().getName() );
         
-        if ( name.endsWith( replConsumerConfigDn ) ||
-             name.endsWith( schemaDn ) ||
-             name.endsWith( replConsumerDn ) )
+        if ( name.endsWith( replConsumerConfigDn )
+            || name.endsWith( schemaDn )
+            || name.endsWith( replConsumerDn ) )
         {
             return true;
         }
         
         // do not replicate the changes made to transport config entries
-        if( name.startsWith( "ads-transportid" ) && name.endsWith( ServerDNConstants.CONFIG_DN ) )
+        if ( name.startsWith( "ads-transportid" ) && name.endsWith( ServerDNConstants.CONFIG_DN ) )
         {
             return true;
         }
@@ -583,11 +583,11 @@ public class SyncReplSearchListener impl
      */
     private boolean isMmrConfiguredToReceiver( AbstractChangeOperationContext ctx )
     {
-        if( ctx.isReplEvent() )
+        if ( ctx.isReplEvent() )
         {
             boolean skip = ( ctx.getRid() == consumerMsgLog.getId() );
             
-            if( skip )
+            if ( skip )
             {
                 LOG.debug( "RID in operation context matches with the ID of replication event log {} for host {}", consumerMsgLog.getName(), consumerMsgLog.getHostName() );
             }

Modified: directory/apacheds/trunk/protocol-ntp/src/checkstyle/suppressions.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/checkstyle/suppressions.xml?rev=1701691&r1=1701690&r2=1701691&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/checkstyle/suppressions.xml (original)
+++ directory/apacheds/trunk/protocol-ntp/src/checkstyle/suppressions.xml Mon Sep  7 20:33:14 2015
@@ -24,6 +24,6 @@
     "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
 
 <suppressions>
-    <!-- Large files -->
+    <!-- More than 7 parameters in constructor -->
     <suppress files="org.apache.directory.server.ntp.messages.NtpMessage" checks="ParameterNumber"/>
 </suppressions>



Mime
View raw message