directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1030875 - in /directory/shared/trunk/ldap/src: main/java/org/apache/directory/shared/ldap/name/DN.java test/java/org/apache/directory/shared/ldap/name/DNTest.java
Date Thu, 04 Nov 2010 10:39:47 GMT
Author: seelmann
Date: Thu Nov  4 10:39:46 2010
New Revision: 1030875

URL: http://svn.apache.org/viewvc?rev=1030875&view=rev
Log:
Adjust normalized flag when getting DN.getParent()

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java?rev=1030875&r1=1030874&r2=1030875&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
Thu Nov  4 10:39:46 2010
@@ -1029,6 +1029,7 @@ public class DN implements Cloneable, Se
 
         newDn.normName = newDn.toNormName();
         newDn.upName = getUpNamePrefix( posn );
+        newDn.normalized.set( normalized.get() );
 
         return newDn;
     }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java?rev=1030875&r1=1030874&r2=1030875&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/DNTest.java
Thu Nov  4 10:39:46 2010
@@ -2418,6 +2418,7 @@ public class DNTest
 
         DN two = new DN( "cn=test,o=acme" );
         assertNotNull( two.getParent() );
+        assertFalse( two.getParent().isNormalized() );
         assertFalse( two.getParent().isEmpty() );
         assertEquals( "o=acme", two.getParent().getName() );
 
@@ -2425,6 +2426,7 @@ public class DNTest
         three.normalize( oids );
         DN threeParent = three.getParent();
         assertNotNull( threeParent );
+        assertTrue( threeParent.isNormalized() );
         assertFalse( threeParent.isEmpty() );
         assertEquals( "dc=example,dc=com", threeParent.getName() );
         assertEquals( 2, threeParent.getRdns().size() );
@@ -2432,6 +2434,7 @@ public class DNTest
         DN five = new DN( "uid=user1,ou=sales,ou=users,dc=example,dc=com" );
         DN fiveParent = five.getParent();
         assertNotNull( fiveParent );
+        assertFalse( fiveParent.isNormalized() );
         assertFalse( fiveParent.isEmpty() );
         assertEquals( "ou=sales,ou=users,dc=example,dc=com", fiveParent.getName() );
         assertEquals( 4, fiveParent.getRdns().size() );



Mime
View raw message