You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2007/05/09 22:01:58 UTC

svn commit: r536638 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributesImpl.java

Author: elecharny
Date: Wed May  9 13:01:58 2007
New Revision: 536638

URL: http://svn.apache.org/viewvc?view=rev&rev=536638
Log:
Removed the useless idToLowerCase method, replaced by a direct call
to asciiToLower()

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributesImpl.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributesImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributesImpl.java?view=diff&rev=536638&r1=536637&r2=536638
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributesImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributesImpl.java Wed May  9 13:01:58 2007
@@ -401,7 +401,7 @@
     {
         if ( attrId != null )
         {
-            String key = idToLowerCase( attrId );
+            String key = StringTools.lowerCaseAscii( attrId );
             
             return (AttributeImpl)keyMap.get( key );
         }
@@ -473,7 +473,7 @@
         AttributeImpl attr = new AttributeImpl( attrId );
         attr.add( val );
         
-        String key = idToLowerCase( attrId );
+        String key = StringTools.lowerCaseAscii( attrId );
         
         keyMap.put( key, attr );
         return attr;
@@ -495,7 +495,7 @@
     public Attribute put( Attribute attr )
     {
         String id = attr.getID();
-        String key = idToLowerCase( id );
+        String key = StringTools.lowerCaseAscii( id );
 
         Attribute old = null;
         AttributeImpl newAttr = null;
@@ -550,7 +550,7 @@
      */
     public Attribute remove( String attrId )
     {
-        String key = idToLowerCase( attrId );
+        String key = StringTools.lowerCaseAscii( attrId );
         
         if ( keyMap.containsKey( key ) )
         {
@@ -560,26 +560,6 @@
         {
             return null;
         }
-    }
-
-    /**
-     * Private method to allow '*' and '+' attribute ID to be 
-     * accepted as a key.
-     */
-    private String idToLowerCase( String id )
-    {
-        String key = null;
-        
-        if ( "+".equals( id ) || "*".equals(  id  ) )
-        {
-            key = id;
-        }
-        else
-        {
-            key = StringTools.toLowerCase( id );
-        }
-
-        return key;
     }
 
     /**