directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r620280 - in /directory/shared/branches/bigbang/ldap/src: main/java/org/apache/directory/shared/ldap/name/ test/java/org/apache/directory/shared/ldap/name/
Date Sun, 10 Feb 2008 13:14:01 GMT
Author: seelmann
Date: Sun Feb 10 05:13:59 2008
New Revision: 620280

URL: http://svn.apache.org/viewvc?rev=620280&view=rev
Log:
Fix for DIRSTUDIO-161. RDN with empty value is valid, e.g. 'dc='

Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
    directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java?rev=620280&r1=620279&r2=620280&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java
Sun Feb 10 05:13:59 2008
@@ -595,7 +595,7 @@
         if( bytes.length <= pos.start )
         {
             // no attribute value
-            return false;
+            return true;
         }
 
         byte c = bytes[pos.start];

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?rev=620280&r1=620279&r2=620280&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Sun Feb 10 05:13:59 2008
@@ -2742,8 +2742,8 @@
         assertFalse( LdapDN.isValid( "a" ) );
         assertFalse( LdapDN.isValid( "a " ) );
 
-        assertFalse( LdapDN.isValid( "a=" ) );
-        assertFalse( LdapDN.isValid( "a= " ) );
+        assertTrue( LdapDN.isValid( "a=" ) );
+        assertTrue( LdapDN.isValid( "a= " ) );
 
         assertFalse( LdapDN.isValid( "=" ) );
         assertFalse( LdapDN.isValid( " = " ) );

Modified: directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java?rev=620280&r1=620279&r2=620280&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
(original)
+++ directory/shared/branches/bigbang/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
Sun Feb 10 05:13:59 2008
@@ -1095,6 +1095,8 @@
     @Test
     public void testRdnWithEmptyValue() throws InvalidNameException
     {
+        assertTrue( RdnParser.isValid( "a=" ) );
+        assertTrue( RdnParser.isValid( "a=\"\"" ) );
         assertEquals( "a=", new Rdn( "a=\"\"" ).toString() );
         assertEquals( "a=", new Rdn( "a=" ).toString() );
     }



Mime
View raw message