You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2005/03/29 17:52:10 UTC

svn commit: r159383 - directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java

Author: akarasulu
Date: Tue Mar 29 07:52:09 2005
New Revision: 159383

URL: http://svn.apache.org/viewcvs?view=rev&rev=159383
Log:
applying 

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java?view=diff&r1=159382&r2=159383
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java Tue Mar 29 07:52:09 2005
@@ -142,16 +142,34 @@
          * returned on a getNameSet.
          */
         String lowerCase = name.trim().toLowerCase();
-        if ( ! name.equals( lowerCase )
-        && byName.containsKey( lowerCase ) )
-        {
-            String oid = ( String ) byName.get( lowerCase );
-            monitor.oidResolved( name, lowerCase, oid );
+        if ( ! name.equals( lowerCase ) )
+		{
+			if ( byName.containsKey( lowerCase ) )
+	        {
+	            String oid = ( String ) byName.get( lowerCase );
+	            monitor.oidResolved( name, lowerCase, oid );
+	
+	            // We expect to see this version of the key again so we add it
+	            byName.put( name, oid );
+	            return oid;
+	        }
+			
+			/*
+			 * Some LDAP servers (MS Active Directory) tend to use some of the
+			 * bootstrap oid names as all caps, like OU. This should resolve that.
+			 * Lets stash this in the byName if we find it.
+			 */
+			
+			if ( bootstrap.hasOid( lowerCase) )
+			{
+	            String oid = bootstrap.getOid( name );
+	            monitor.oidResolved( name, oid );
 
-            // We expect to see this version of the key again so we add it
-            byName.put( name, oid );
-            return oid;
-        }
+	            // We expect to see this version of the key again so we add it
+				byName.put( name, oid );
+	            return oid;
+			}
+		}
 
         NamingException fault = new NamingException ( "OID for name '"
                 + name + "' was not " + "found within the OID registry" );



Re: svn commit: r159383 - directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/schema/GlobalOidRegistry.java

Posted by Alex Karasulu <ao...@bellsouth.net>.
akarasulu@apache.org wrote:

>Author: akarasulu
>Date: Tue Mar 29 07:52:09 2005
>New Revision: 159383
>
>URL: http://svn.apache.org/viewcvs?view=rev&rev=159383
>Log:
>applying
>  
>

Please excuse the abrupt commit message (accidentally commited before 
complete) I was applying the following patch from Jacob ...

http://issues.apache.org/jira/browse/DIREVE-150

Alex