directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1090891 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Date Sun, 10 Apr 2011 20:46:53 GMT
Author: kayyagari
Date: Sun Apr 10 20:46:53 2011
New Revision: 1090891

URL: http://svn.apache.org/viewvc?rev=1090891&view=rev
Log:
o changed the way SASL mechanisms are registered and added to the RootDSE
  (this fixes a warning displayed while starting the server)

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=1090891&r1=1090890&r2=1090891&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Sun Apr 10 20:46:53 2011
@@ -1092,18 +1092,16 @@ public class DefaultPartitionNexus exten
      */
     public void registerSupportedSaslMechanisms( Set<String> supportedSaslMechanisms
) throws LdapException
     {
-        Attribute supportedSaslMechanismsAttribute = rootDSE.get( SchemaConstants.SUPPORTED_SASL_MECHANISMS_AT
);
+        Attribute supportedSaslMechanismsAt = null;
 
-        if ( supportedSaslMechanismsAttribute == null )
-        {
-            rootDSE.put( SchemaConstants.SUPPORTED_SASL_MECHANISMS_AT, (String)null );
-            supportedSaslMechanismsAttribute = rootDSE.get( SchemaConstants.SUPPORTED_SASL_MECHANISMS_AT
);
-        }
+        supportedSaslMechanismsAt = new DefaultAttribute( schemaManager.lookupAttributeTypeRegistry(
SchemaConstants.SUPPORTED_SASL_MECHANISMS_AT ) );
 
         for ( String saslMechanism : supportedSaslMechanisms )
         {
-            supportedSaslMechanismsAttribute.add( saslMechanism );
+            supportedSaslMechanismsAt.add( saslMechanism );
         }
+        
+        rootDSE.add( supportedSaslMechanismsAt );
     }
 
 



Mime
View raw message