directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1697150 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java
Date Sun, 23 Aug 2015 04:42:37 GMT
Author: elecharny
Date: Sun Aug 23 04:42:36 2015
New Revision: 1697150

URL: http://svn.apache.org/r1697150
Log:
Replaced direct calls to String.toLowerCase() to call to Strings.toLowerCase()

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java?rev=1697150&r1=1697149&r2=1697150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java
Sun Aug 23 04:42:36 2015
@@ -29,6 +29,8 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.TreeMap;
 
+import org.apache.directory.api.util.Strings;
+
 
 /**
  * Various utility methods for sorting schema objects.
@@ -131,12 +133,14 @@ public final class SchemaObjectSorter
 
             for ( T schemaObject : schemaObjects )
             {
-                String oid = schemaObject.getOid().toLowerCase();
+                String oid = Strings.lowerCase( schemaObject.getOid() );
                 oid2numericOid.put( oid, oid );
+                
                 for ( String name : schemaObject.getNames() )
                 {
-                    oid2numericOid.put( name.toLowerCase(), oid );
+                    oid2numericOid.put( Strings.lowerCase( name ), oid );
                 }
+                
                 numericOid2schemaObject.put( oid, schemaObject );
             }
         }
@@ -179,7 +183,7 @@ public final class SchemaObjectSorter
                             continue;
                         }
 
-                        String superiorNumeridOid = oid2numericOid.get( superiorOid.toLowerCase()
);
+                        String superiorNumeridOid = oid2numericOid.get( Strings.lowerCase(
superiorOid ) );
 
                         // AT's superior is not within the processed AT list
                         if ( superiorNumeridOid == null )
@@ -187,7 +191,7 @@ public final class SchemaObjectSorter
                             continue;
                         }
 
-                        T superiorSchemaObject = numericOid2schemaObject.get( superiorNumeridOid.toLowerCase()
);
+                        T superiorSchemaObject = numericOid2schemaObject.get( Strings.lowerCase(
superiorNumeridOid ) );
 
                         // AT's superior was already removed
                         if ( superiorSchemaObject == null )



Mime
View raw message