directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r219580 - in /directory/shared/ldap/trunk/common/src: java/org/apache/ldap/common/ldif/LdifParserImpl.java test/org/apache/ldap/common/ldif/LdifParserImplTest.java
Date Mon, 18 Jul 2005 23:12:28 GMT
Author: akarasulu
Date: Mon Jul 18 16:11:11 2005
New Revision: 219580

URL: http://svn.apache.org/viewcvs?rev=219580&view=rev
Log:
changes ...

 o added more checks to test case
 o checks revieled spaces were in attribute values after ldif parse
 o corrected bug introduced after I changed the ldif parser last


Modified:
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/ldif/LdifParserImpl.java
    directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/ldif/LdifParserImplTest.java

Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/ldif/LdifParserImpl.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/ldif/LdifParserImpl.java?rev=219580&r1=219579&r2=219580&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/ldif/LdifParserImpl.java
(original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/ldif/LdifParserImpl.java
Mon Jul 18 16:11:11 2005
@@ -114,7 +114,7 @@
                     }
 
                     // Capture attribute value from first char till end of line.
-                    attrValue = line.substring( index );
+                    attrValue = line.substring( index + 1 );
                 }
                 catch ( StringIndexOutOfBoundsException e )
                 {

Modified: directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/ldif/LdifParserImplTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/ldif/LdifParserImplTest.java?rev=219580&r1=219579&r2=219580&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/ldif/LdifParserImplTest.java
(original)
+++ directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/ldif/LdifParserImplTest.java
Mon Jul 18 16:11:11 2005
@@ -8,6 +8,7 @@
 import org.apache.ldap.common.message.LockableAttributesImpl;
 
 import javax.naming.directory.Attributes;
+import javax.naming.directory.Attribute;
 import javax.naming.NamingException;
 
 
@@ -34,5 +35,10 @@
         parser.parse( attrs, ldif );
 
         assertNotNull( attrs );
+
+        Attribute attr = attrs.get( "objectClass" );
+        assertTrue( attr.contains( "apApplication" ) );
+        assertTrue( attr.contains( "top" ) );
+
     }
 }



Mime
View raw message