directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1071819 - in /directory/shared/branches/m1: integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Date Thu, 17 Feb 2011 22:40:37 GMT
Author: elecharny
Date: Thu Feb 17 22:40:37 2011
New Revision: 1071819

URL: http://svn.apache.org/viewvc?rev=1071819&view=rev
Log:
Renamed the Dn.isParentOf() method to isAncestorOf()

Modified:
    directory/shared/branches/m1/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java
    directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java

Modified: directory/shared/branches/m1/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java?rev=1071819&r1=1071818&r2=1071819&view=diff
==============================================================================
--- directory/shared/branches/m1/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java
(original)
+++ directory/shared/branches/m1/integ/src/test/java/org/apache/directory/shared/ldap/name/DnTest.java
Thu Feb 17 22:40:37 2011
@@ -1554,9 +1554,9 @@ public class DnTest
         Dn name5 = new Dn( "cn=Airline,cn=John,ou=Marketing,ou=West" );
 
         assertEquals( name0, copy );
-        assertTrue( name0.isParentOf( name1 ) );
-        assertTrue( name0.isParentOf( name2 ) );
-        assertTrue( name1.isParentOf( name2 ) );
+        assertTrue( name0.isAncestorOf( name1 ) );
+        assertTrue( name0.isAncestorOf( name2 ) );
+        assertTrue( name1.isAncestorOf( name2 ) );
         assertTrue( name2.isDescendantOf( name1 ) );
         assertTrue( name2.isDescendantOf( name0 ) );
         assertNotSame( name2, name3 );
@@ -3419,10 +3419,10 @@ public class DnTest
         Dn parent3 = new Dn( "dc=org" );
         Dn notParent = new Dn( "ou=example,dc=apache, dc=com" );
 
-        assertTrue( parent1.isParentOf( dn ) );
-        assertTrue( parent2.isParentOf( dn ) );
-        assertTrue( parent3.isParentOf( dn ) );
-        assertFalse( notParent.isParentOf( dn ) );
+        assertTrue( parent1.isAncestorOf( dn ) );
+        assertTrue( parent2.isAncestorOf( dn ) );
+        assertTrue( parent3.isAncestorOf( dn ) );
+        assertFalse( notParent.isAncestorOf( dn ) );
     }
 
 

Modified: directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java?rev=1071819&r1=1071818&r2=1071819&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
(original)
+++ directory/shared/branches/m1/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Thu Feb 17 22:40:37 2011
@@ -827,11 +827,11 @@ public final class Dn implements Iterabl
      * @param dn The child
      * @return true if the current Dn is a parent of the given Dn
      */
-    public boolean isParentOf( String dn )
+    public boolean isAncestorOf( String dn )
     {
         try
         {
-            return isParentOf( new Dn( dn ) );
+            return isAncestorOf( new Dn( dn ) );
         }
         catch ( LdapInvalidDnException lide )
         {
@@ -848,7 +848,7 @@ public final class Dn implements Iterabl
      * @param dn The child
      * @return true if the current Dn is a parent of the given Dn
      */
-    public boolean isParentOf( Dn dn )
+    public boolean isAncestorOf( Dn dn )
     {
         if ( dn == null )
         {



Mime
View raw message