directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1153370 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/ core-api/src/test/java/org/apache/directory/server/core/ core-integ/src/test/java/org/apache/directory/server/core/authz/ core-integ/src/test/...
Date Wed, 03 Aug 2011 07:25:40 GMT
Author: elecharny
Date: Wed Aug  3 07:25:37 2011
New Revision: 1153370

URL: http://svn.apache.org/viewvc?rev=1153370&view=rev
Log:
o Added the CoreSession.modify( Dn, Modification...) method
o Used it where it's convenient
o Fixed the Modification handling in ReplConsumerManager
o Fix dthe cookieModifciation handling in SuncReplConsumer
o Added some Javadoc (never ending story...)

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCoreSession.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java
Wed Aug  3 07:25:37 2011
@@ -410,6 +410,17 @@ public interface CoreSession
      * @throws Exception if there are failures while modifying the entry
      */
     void modify( Dn dn, List<Modification> mods ) throws LdapException;
+
+    
+    /**
+     * Modifies an entry within the server by applying a list of modifications 
+     * to the entry.
+     *
+     * @param dn the distinguished name of the entry to modify
+     * @param mods the list of modifications to apply
+     * @throws Exception if there are failures while modifying the entry
+     */
+    void modify( Dn dn, Modification... mods ) throws LdapException;
     
     
     /**

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCoreSession.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCoreSession.java
(original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockCoreSession.java
Wed Aug  3 07:25:37 2011
@@ -23,6 +23,7 @@ package org.apache.directory.server.core
 import java.net.SocketAddress;
 import java.text.ParseException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
 
@@ -514,6 +515,15 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
+    public void modify( Dn dn, Modification... mods ) throws LdapException
+    {
+        modify( dn, Arrays.asList( mods ), LogChange.TRUE );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public void modify( Dn dn, List<Modification> mods ) throws LdapException
     {
         modify( dn, mods, LogChange.TRUE );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
Wed Aug  3 07:25:37 2011
@@ -25,9 +25,7 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.LdapPrincipal;
@@ -35,11 +33,11 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException;
@@ -138,10 +136,7 @@ public class AuthorizationServiceAsNonAd
 
         Attribute attribute = new DefaultAttribute( "userPassword", "replaced" );
 
-        List<Modification> mods = new ArrayList<Modification>();
-        
         Modification mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
attribute );
-        mods.add( mod );
       
         Dn userDn = new Dn( getService().getSchemaManager(), "uid=akarasulu,ou=users,ou=system"
);
         LdapPrincipal principal = new LdapPrincipal( getService().getSchemaManager(), userDn,
AuthenticationLevel.SIMPLE );
@@ -149,8 +144,7 @@ public class AuthorizationServiceAsNonAd
 
         try
         {
-            akarasuluSession.modify( 
-                new Dn( "uid=admin,ou=system" ), mods );
+            akarasuluSession.modify( new Dn( "uid=admin,ou=system" ), mod );
             fail( "User 'uid=admin,ou=system' should not be able to modify attributes on
admin" );
         }
         catch ( Exception e )

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
Wed Aug  3 07:25:37 2011
@@ -243,11 +243,8 @@ public class ModifyReferralIT extends Ab
             Attribute attr = new DefaultAttribute( "Description", "this is a test" );
             Modification mod = new DefaultModification(
                 ModificationOperation.ADD_ATTRIBUTE, attr );
-            List<Modification> mods = new ArrayList<Modification>();
-            
-            mods.add( mod );
             
-            session.modify( new Dn( "cn=Emmanuel Lecharny,ou=Roles,c=MNN,o=WW,ou=system"
), mods );
+            session.modify( new Dn( "cn=Emmanuel Lecharny,ou=Roles,c=MNN,o=WW,ou=system"
), mod );
             fail();
         }
         catch ( LdapNoSuchObjectException lnsoe )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
Wed Aug  3 07:25:37 2011
@@ -23,6 +23,7 @@ package org.apache.directory.server.core
 import java.net.SocketAddress;
 import java.text.ParseException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
 
@@ -533,6 +534,15 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
+    public void modify( Dn dn, Modification... mods ) throws LdapException
+    {
+        modify( dn, Arrays.asList( mods ), LogChange.TRUE );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public void modify( Dn dn, List<Modification> mods ) throws LdapException
     {
         modify( dn, mods, LogChange.TRUE );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AbstractAuthenticator.java
Wed Aug  3 07:25:37 2011
@@ -29,7 +29,6 @@ import static org.apache.directory.share
 import static org.apache.directory.shared.ldap.model.constants.PasswordPolicySchemaConstants.PWD_LAST_SUCCESS_AT;
 import static org.apache.directory.shared.ldap.model.constants.PasswordPolicySchemaConstants.PWD_START_TIME_AT;
 
-import java.util.Collections;
 import java.util.Date;
 
 import org.apache.directory.server.core.DirectoryService;
@@ -191,7 +190,7 @@ public abstract class AbstractAuthentica
                         Modification pwdAccountLockMod = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
 accountLockAttr );
                         
                         // DO NOT bypass the interceptor chain, otherwise the changes can't
be replicated
-                        directoryService.getAdminSession().modify( userEntry.getDn(), Collections.singletonList(
pwdAccountLockMod ) );
+                        directoryService.getAdminSession().modify( userEntry.getDn(), pwdAccountLockMod
);
                     }
                 }
             }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Wed Aug  3 07:25:37 2011
@@ -517,6 +517,7 @@ public class AuthenticationInterceptor e
         Dn userDn = modifyContext.getSession().getAuthenticatedPrincipal().getDn();
 
         PwdModDetailsHolder pwdModDetails = null;
+        
         if ( policyConfig.isPwdSafeModify() || pwdResetSet.contains( userDn ) || ( policyConfig.getPwdMinAge()
> 0 ) )
         {
             pwdModDetails = getPwdModDetails( modifyContext, policyConfig );
@@ -545,6 +546,7 @@ public class AuthenticationInterceptor e
                 if ( pwdModDetails.isAddOrReplace() && !pwdModDetails.isDelete()
)
                 {
                     LOG.debug( "trying to update password attribute without the supplying
the old password" );
+                    
                     if ( isPPolicyReqCtrlPresent )
                     {
                         PasswordPolicyDecorator responseControl = 
@@ -559,7 +561,6 @@ public class AuthenticationInterceptor e
 
             if ( !policyConfig.isPwdAllowUserChange() && !modifyContext.getSession().isAnAdministrator()
)
             {
-
                 if ( isPPolicyReqCtrlPresent )
                 {
                     PasswordPolicyDecorator responseControl = 
@@ -588,6 +589,7 @@ public class AuthenticationInterceptor e
             }
 
             byte[] newPassword = null;
+            
             if ( ( pwdModDetails != null ) )
             {
                 newPassword = pwdModDetails.getNewPwd();
@@ -662,9 +664,11 @@ public class AuthenticationInterceptor e
             }
 
             next.modify( modifyContext );
+            
             invalidateAuthenticatorCaches( modifyContext.getDn() );
 
             List<Modification> mods = new ArrayList<Modification>();
+            
             if ( ( policyConfig.getPwdMinAge() > 0 ) || ( policyConfig.getPwdMaxAge()
> 0 ) )
             {
                 Attribute pwdChangedTimeAt = new DefaultAttribute( AT_PWD_CHANGED_TIME );
@@ -684,6 +688,7 @@ public class AuthenticationInterceptor e
             }
 
             boolean removeFromPwdResetSet = false;
+            
             if ( policyConfig.isPwdMustChange() )
             {
                 Attribute pwdMustChangeAt = new DefaultAttribute( AT_PWD_RESET );
@@ -704,12 +709,14 @@ public class AuthenticationInterceptor e
             }
 
             Attribute pwdFailureTimeAt = entry.get( PWD_FAILURE_TIME_AT );
+            
             if ( pwdFailureTimeAt != null )
             {
                 mods.add( new DefaultModification( REMOVE_ATTRIBUTE, pwdFailureTimeAt ) );
             }
 
             Attribute pwdGraceUseTimeAt = entry.get( PWD_GRACE_USE_TIME_AT );
+            
             if ( pwdGraceUseTimeAt != null )
             {
                 mods.add( new DefaultModification( REMOVE_ATTRIBUTE, pwdGraceUseTimeAt )
);

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ChangePassword.java
Wed Aug  3 07:25:37 2011
@@ -20,19 +20,16 @@
 package org.apache.directory.server.kerberos.shared.store.operations;
 
 
-import java.util.ArrayList;
-import java.util.List;
-
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
 import org.apache.directory.server.protocol.shared.store.DirectoryServiceOperation;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -75,20 +72,18 @@ public class ChangePassword implements D
 
         SchemaManager schemaManager = session.getDirectoryService().getSchemaManager();
         
-        List<Modification> mods = new ArrayList<Modification>(2);
-        
         Attribute newPasswordAttribute = new DefaultAttribute(
             schemaManager.lookupAttributeTypeRegistry( SchemaConstants.USER_PASSWORD_AT ),
Strings.getBytesUtf8(newPassword) );
-        mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, newPasswordAttribute
) );
+        Modification passwordMod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
newPasswordAttribute );
         
         Attribute principalAttribute = new DefaultAttribute( 
             schemaManager.lookupAttributeTypeRegistry( KerberosAttribute.KRB5_PRINCIPAL_NAME_AT
), principal.getName() );
-        mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, principalAttribute
) );
+        Modification principalMod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
principalAttribute );
         
         //FIXME check if keyderivation is necessary
         
         Entry entry = StoreUtils.findPrincipalEntry( session, searchBaseDn, principal.getName()
);
-        session.modify( entry.getDn(), mods );
+        session.modify( entry.getDn(), passwordMod, principalMod );
 
         return entry.getDn().toString();
     }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplConsumerManager.java
Wed Aug  3 07:25:37 2011
@@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * TODO ReplicaDitStoreUtil.
+ * Manage the consumers on the provider : add them, and remove them.
  * 
  * All the consumers configuration will be stored in the 'ou=consumers,ou=system' branch.
  *
@@ -82,7 +82,7 @@ public class ReplConsumerManager
     /** An ObjectClass AT instance */
     private static AttributeType OBJECT_CLASS_AT;
 
-    private Map<Integer, List<Modification>> modMap = new HashMap<Integer,
List<Modification>>();
+    private Map<Integer, Modification> modMap = new HashMap<Integer, Modification>();
 
 
     /**
@@ -159,6 +159,8 @@ public class ReplConsumerManager
 
         adminSession.add( entry );
         
+        // Last, create a 
+        
         LOG.debug( "stored replication consumer entry {}", consumerDn );
     }
 
@@ -197,31 +199,29 @@ public class ReplConsumerManager
 
     public void updateReplicaLastSentCsn( ReplicaEventLog replica ) throws Exception
     {
-        List<Modification> mods = modMap.get( replica.getId() );
+        Modification mod = modMap.get( replica.getId() );
         Attribute lastSentCsnAt = null;
         
-        if ( mods == null )
+        if ( mod == null )
         {
             lastSentCsnAt = new DefaultAttribute( schemaManager
                 .lookupAttributeTypeRegistry( SchemaConstants.ADS_REPL_LAST_SENT_CSN ) );
             lastSentCsnAt.add( replica.getLastSentCsn() );
 
-            Modification mod = new DefaultModification();
+            mod = new DefaultModification();
             mod.setOperation( ModificationOperation.REPLACE_ATTRIBUTE );
             mod.setAttribute( lastSentCsnAt );
-
-            mods = new ArrayList<Modification>( 1 );
-            mods.add( mod );
         }
         else
         {
-            lastSentCsnAt = mods.get( 0 ).getAttribute();
+            lastSentCsnAt = mod.getAttribute();
             lastSentCsnAt.clear(); // clearing is mandatory
             lastSentCsnAt.add( replica.getLastSentCsn() );
         }
 
-        Dn dn = new Dn( schemaManager, SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId()
+ "," + REPL_CONSUMER_DN );
-        adminSession.modify( dn, mods );
+        Dn dn = directoryService.getDnFactory().create( SchemaConstants.ADS_DS_REPLICA_ID
+ "=" + replica.getId() + "," + REPL_CONSUMER_DN );
+        adminSession.modify( dn, mod );
+        
         LOG.debug( "updated last sent CSN of consumer entry {}", dn );
     }
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java?rev=1153370&r1=1153369&r2=1153370&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java
Wed Aug  3 07:25:37 2011
@@ -144,7 +144,7 @@ public class SyncReplConsumer implements
     /** The set used for search attributes, containing only the entryUuid AT */
     private static final Set<AttributeTypeOptions> ENTRY_UUID_ATOP_SET = new HashSet<AttributeTypeOptions>();
 
-    private List<Modification> cookieModLst;
+    private Modification cookieMod;
 
     /** AttributeTypes used for replication */
     private static AttributeType COOKIE_AT_TYPE;
@@ -188,8 +188,7 @@ public class SyncReplConsumer implements
         Attribute cookieAttr = new DefaultAttribute( COOKIE_AT_TYPE );
 
         Modification cookieMod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
cookieAttr );
-        cookieModLst = new ArrayList<Modification>( 1 );
-        cookieModLst.add( cookieMod );
+        this.cookieMod = cookieMod;
 
         prepareSyncSearchRequest();
     }
@@ -669,11 +668,11 @@ public class SyncReplConsumer implements
             }
             else
             {
-                Attribute attr = cookieModLst.get( 0 ).getAttribute();
+                Attribute attr = cookieMod.getAttribute();
                 attr.clear();
                 attr.add( syncCookie );
 
-                session.modify( config.getConfigEntryDn(), cookieModLst );
+                session.modify( config.getConfigEntryDn(), cookieMod );
             }
 
             lastSavedCookie = new byte[syncCookie.length];
@@ -761,9 +760,7 @@ public class SyncReplConsumer implements
                 Attribute cookieAttr = new DefaultAttribute( COOKIE_AT_TYPE );
                 Modification deleteCookieMod = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
                     cookieAttr );
-                List<Modification> deleteModLst = new ArrayList<Modification>();
-                deleteModLst.add( deleteCookieMod );
-                session.modify( config.getConfigEntryDn(), deleteModLst );
+                session.modify( config.getConfigEntryDn(), deleteCookieMod );
             }
             catch ( Exception e )
             {
@@ -853,6 +850,7 @@ public class SyncReplConsumer implements
         if ( remoteEntry.size() > 0 )
         {
             itr = remoteEntry.iterator();
+            
             while ( itr.hasNext() )
             {
                 mods.add( new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, itr.next()
) );



Mime
View raw message