directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r378900 - /directory/sandbox/akarasulu/rc1/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
Date Sun, 19 Feb 2006 14:19:12 GMT
Author: elecharny
Date: Sun Feb 19 06:19:11 2006
New Revision: 378900

URL: http://svn.apache.org/viewcvs?rev=378900&view=rev
Log:
Fixed a DN parsing error with OID in the NCs

Modified:
    directory/sandbox/akarasulu/rc1/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java

Modified: directory/sandbox/akarasulu/rc1/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=378900&r1=378899&r2=378900&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
(original)
+++ directory/sandbox/akarasulu/rc1/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
Sun Feb 19 06:19:11 2006
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.ldap.codec.util.LdapStringEncodingException;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.OidNormalizer;
+import org.apache.directory.shared.ldap.util.DNUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -1093,6 +1094,11 @@
     {
         String type = StringTools.trim( atav.getType() );
 
+        if ( ( type.startsWith( "oid." ) ) || ( type.startsWith( "OID." ) ) )
+        {
+            type = type.substring( 4 );
+        }
+
         if ( StringTools.isNotEmpty( StringTools.lowerCase( type ) ) )
         {
             OidNormalizer oidNormalizer = ( OidNormalizer ) oids.get( type );
@@ -1153,6 +1159,11 @@
         else
         {
             String type = StringTools.trim( rdn.getType() );
+            
+            if ( ( type.startsWith( "oid." ) ) || ( type.startsWith( "OID." ) ) )
+            {
+                type = type.substring( 4 );
+            }
 
             if ( StringTools.isNotEmpty( StringTools.lowerCase( type ) ) )
             {



Mime
View raw message