directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r433060 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java
Date Sun, 20 Aug 2006 21:57:25 GMT
Author: akarasulu
Date: Sun Aug 20 14:57:24 2006
New Revision: 433060

URL: http://svn.apache.org/viewvc?rev=433060&view=rev
Log:
merging 1.0 change to fix inefficiency and for bug workaround in LdapDN

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java?rev=433060&r1=433059&r2=433060&view=diff
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/NamespaceTools.java
Sun Aug 20 14:57:24 2006
@@ -390,7 +390,15 @@
      */
     public static Name getRelativeName( Name ancestor, Name descendant ) throws NamingException
     {
-        LdapDN rdn = new LdapDN( descendant.toString() );
+        LdapDN rdn = null;
+        if ( descendant instanceof LdapDN )
+        {
+            rdn = ( LdapDN ) descendant.clone();
+        }
+        else
+        {
+            rdn = new LdapDN( descendant.toString() );
+        }
 
         if ( rdn.startsWith( ancestor ) )
         {



Mime
View raw message