directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1409846 - /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConfiguration.java
Date Thu, 15 Nov 2012 15:49:35 GMT
Author: pamarcelot
Date: Thu Nov 15 15:49:35 2012
New Revision: 1409846

URL: http://svn.apache.org/viewvc?rev=1409846&view=rev
Log:
Fixed the setAttributes method which was still keeping reference of old attributes.

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConfiguration.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConfiguration.java?rev=1409846&r1=1409845&r2=1409846&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConfiguration.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConfiguration.java
Thu Nov 15 15:49:35 2012
@@ -129,6 +129,7 @@ public class SyncReplConfiguration imple
     /** flag to indicate if this node is part of a MMR setup, default value is true */
     private boolean mmrMode = true;
 
+
     /**
      * Creates a new instance of SyncreplConfiguration
      */
@@ -136,7 +137,7 @@ public class SyncReplConfiguration imple
     {
         attributes = new HashSet<String>();
         attributes.add( SchemaConstants.ALL_USER_ATTRIBUTES );
-        attributes.add( Strings.toLowerCase( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES )
);
+        attributes.add( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES );
     }
 
 
@@ -299,30 +300,15 @@ public class SyncReplConfiguration imple
 
 
     /**
-     * @param attr the attributes to set
+     * @param attrs the attributes to set
      */
-    public void setAttributes( String[] attr )
+    public void setAttributes( String[] attrs )
     {
-        if ( attr == null )
+        attributes.clear();
+        
+        for ( String attr : attrs )
         {
-            throw new IllegalArgumentException( "attributes to be replicated cannot be null
or empty" );
-        }
-
-        // if user specified some attributes then remove the * from attributes
-        // NOTE: if the user specifies * in the given array that eventually gets added later
-        if ( attr.length > 0 )
-        {
-            attributes.remove( SchemaConstants.ALL_USER_ATTRIBUTES );
-        }
-
-        for ( String at : attr )
-        {
-            at = at.trim();
-
-            if ( !attributes.contains( Strings.toLowerCase( at ) ) )
-            {
-                attributes.add( at );
-            }
+            attributes.add( attr );
         }
     }
 
@@ -551,6 +537,7 @@ public class SyncReplConfiguration imple
         this.configEntryDn = configEntryDn;
     }
 
+
     /**
      * @return true if this node is part of MMR setup
      */



Mime
View raw message