directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r819876 - /directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
Date Tue, 29 Sep 2009 10:29:06 GMT
Author: elecharny
Date: Tue Sep 29 10:29:06 2009
New Revision: 819876

URL: http://svn.apache.org/viewvc?rev=819876&view=rev
Log:
Lowercased the schema name
minor refactoring

Modified:
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java?rev=819876&r1=819875&r2=819876&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
Tue Sep 29 10:29:06 2009
@@ -107,17 +107,17 @@
     public Registries()
     {
         this.oidRegistry = new OidRegistry();
-        normalizerRegistry = new NormalizerRegistry( oidRegistry );
-        comparatorRegistry = new ComparatorRegistry( oidRegistry );
-        syntaxCheckerRegistry = new SyntaxCheckerRegistry( oidRegistry );
-        ldapSyntaxRegistry = new LdapSyntaxRegistry( oidRegistry );
-        matchingRuleRegistry = new MatchingRuleRegistry( oidRegistry );
         attributeTypeRegistry = new AttributeTypeRegistry( oidRegistry );
-        objectClassRegistry = new ObjectClassRegistry( oidRegistry );
+        comparatorRegistry = new ComparatorRegistry( oidRegistry );
         ditContentRuleRegistry = new DITContentRuleRegistry( oidRegistry );
         ditStructureRuleRegistry = new DITStructureRuleRegistry( oidRegistry );
+        ldapSyntaxRegistry = new LdapSyntaxRegistry( oidRegistry );
+        matchingRuleRegistry = new MatchingRuleRegistry( oidRegistry );
         matchingRuleUseRegistry = new MatchingRuleUseRegistry( oidRegistry );
         nameFormRegistry = new NameFormRegistry( oidRegistry );
+        normalizerRegistry = new NormalizerRegistry( oidRegistry );
+        objectClassRegistry = new ObjectClassRegistry( oidRegistry );
+        syntaxCheckerRegistry = new SyntaxCheckerRegistry( oidRegistry );
         schemaObjectsBySchemaName = new HashMap<String, Set<SchemaWrapper>>();
     }
 
@@ -690,6 +690,8 @@
 	
 	public void register( SchemaObject schemaObject ) throws NamingException
 	{
+	    String schemaName = StringTools.toLowerCase( schemaObject.getSchemaName() );
+	    
 	    // First call the specific registry's register method
 	    switch ( schemaObject.getObjectType() )
 	    {
@@ -739,7 +741,7 @@
 	    }
 	    
 	    // And register the schemaObject within its schema
-	    Set<SchemaWrapper> content = schemaObjectsBySchemaName.get( StringTools.toLowerCase(
schemaObject.getSchemaName() ) );
+	    Set<SchemaWrapper> content = schemaObjectsBySchemaName.get( schemaName );
 	    
 	    if ( content == null )
 	    {



Mime
View raw message