directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r552497 - /directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java
Date Mon, 02 Jul 2007 14:05:18 GMT
Author: pamarcelot
Date: Mon Jul  2 07:05:17 2007
New Revision: 552497

URL: http://svn.apache.org/viewvc?view=rev&rev=552497
Log:
Modified the Maps of objects to not be case sensitive.

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java?view=diff&rev=552497&r1=552496&r2=552497
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java
Mon Jul  2 07:05:17 2007
@@ -382,7 +382,7 @@
             attributeTypesList.add( at );
             for ( String name : at.getNames() )
             {
-                attributeTypesMap.put( name, at );
+                attributeTypesMap.put( name.toLowerCase(), at );
             }
             attributeTypesMap.put( at.getOid(), at );
         }
@@ -392,7 +392,7 @@
             matchingRulesList.add( mr );
             for ( String name : mr.getNames() )
             {
-                matchingRulesMap.put( name, mr );
+                matchingRulesMap.put( name.toLowerCase(), mr );
             }
             matchingRulesMap.put( mr.getOid(), mr );
         }
@@ -402,7 +402,7 @@
             objectClassesList.add( oc );
             for ( String name : oc.getNames() )
             {
-                objectClassesMap.put( name, oc );
+                objectClassesMap.put( name.toLowerCase(), oc );
             }
             objectClassesMap.put( oc.getOid(), oc );
         }
@@ -412,7 +412,7 @@
             syntaxesList.add( syntax );
             for ( String name : syntax.getNames() )
             {
-                syntaxesMap.put( name, syntax );
+                syntaxesMap.put( name.toLowerCase(), syntax );
             }
             syntaxesMap.put( syntax.getOid(), syntax );
         }
@@ -473,7 +473,7 @@
             attributeTypesList.remove( at );
             for ( String name : at.getNames() )
             {
-                attributeTypesMap.remove( name );
+                attributeTypesMap.remove( name.toLowerCase() );
             }
             attributeTypesMap.remove( at.getOid() );
         }
@@ -483,7 +483,7 @@
             matchingRulesList.remove( mr );
             for ( String name : mr.getNames() )
             {
-                matchingRulesMap.remove( name );
+                matchingRulesMap.remove( name.toLowerCase() );
             }
             matchingRulesMap.remove( mr.getOid() );
         }
@@ -493,7 +493,7 @@
             objectClassesList.remove( oc );
             for ( String name : oc.getNames() )
             {
-                objectClassesMap.remove( name );
+                objectClassesMap.remove( name.toLowerCase() );
             }
             objectClassesMap.remove( oc.getOid() );
         }
@@ -503,7 +503,7 @@
             syntaxesList.remove( syntax );
             for ( String name : syntax.getNames() )
             {
-                syntaxesMap.remove( name );
+                syntaxesMap.remove( name.toLowerCase() );
             }
             syntaxesMap.remove( syntax.getOid() );
         }
@@ -891,15 +891,16 @@
      */
     public boolean isAliasAlreadyTaken( String alias )
     {
-        if ( attributeTypesMap.containsKey( alias ) )
+        String lowerCasedAlias = alias.toLowerCase();
+        if ( attributeTypesMap.containsKey( lowerCasedAlias ) )
         {
             return true;
         }
-        else if ( objectClassesMap.containsKey( alias ) )
+        else if ( objectClassesMap.containsKey( lowerCasedAlias ) )
         {
             return true;
         }
-        
+
         return false;
     }
 }



Mime
View raw message