directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r423304 - /directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java
Date Wed, 19 Jul 2006 00:10:48 GMT
Author: elecharny
Date: Tue Jul 18 17:10:47 2006
New Revision: 423304

URL: http://svn.apache.org/viewvc?rev=423304&view=rev
Log:
Replaced the string.toLowerCas() by StringTools.toLowerCase( String )
for speed improvment

Modified:
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java?rev=423304&r1=423303&r2=423304&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java
(original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java
Tue Jul 18 17:10:47 2006
@@ -28,6 +28,8 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttribute;
 
+import org.apache.directory.shared.ldap.util.StringTools;
+
 
 /**
  * A case-insensitive Lockable JNDI Attributes implementation.
@@ -278,7 +280,7 @@
     {
     	if ( attrId != null )
     	{
-    		Holder holder = (Holder)keyMap.get( attrId.toLowerCase() );
+    		Holder holder = (Holder)keyMap.get( StringTools.toLowerCase( attrId ) );
     		return holder != null ? holder.attribute : null;
     	}
     	else
@@ -349,7 +351,7 @@
         Attribute attr = new LockableAttributeImpl( attrId );
         attr.add( val );
         
-        String key = attrId.toLowerCase();
+        String key = StringTools.toLowerCase( attrId );
         keyMap.put( key, new Holder( attrId, attr) );
         return attr;
     }
@@ -368,7 +370,7 @@
      */
     public Attribute put( Attribute attr )
     {
-    	String key = attr.getID().toLowerCase();
+    	String key = StringTools.toLowerCase( attr.getID() );
     	Attribute old = null;
     	Attribute newAttr = attr;
     	
@@ -419,7 +421,7 @@
      */
     public Attribute remove( String attrId )
     {
-    	String key = attrId.toLowerCase();
+    	String key = StringTools.toLowerCase( attrId );
     	Attribute old = null;
     	
         if ( keyMap.containsKey( key ) )



Mime
View raw message