directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r536638 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributesImpl.java
Date Wed, 09 May 2007 20:01:58 GMT
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;
     }
 
     /**



Mime
View raw message