directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r754933 - /directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/parser/LdifParser.java
Date Mon, 16 Mar 2009 16:28:21 GMT
Author: seelmann
Date: Mon Mar 16 16:28:21 2009
New Revision: 754933

URL: http://svn.apache.org/viewvc?rev=754933&view=rev
Log:
Fixed problem with comment at the end of moddn record

Modified:
    directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/parser/LdifParser.java

Modified: directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/parser/LdifParser.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/parser/LdifParser.java?rev=754933&r1=754932&r2=754933&view=diff
==============================================================================
--- directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/parser/LdifParser.java
(original)
+++ directory/studio/trunk/ldif-parser/src/main/java/org/apache/directory/studio/ldifparser/parser/LdifParser.java
Mon Mar 16 16:28:21 2009
@@ -581,9 +581,6 @@
 
             // comments
             checkAndParseComment( record );
-
-            // eor
-            checkAndParseEndOfRecord( record );
         }
         while ( true );
     }
@@ -775,9 +772,13 @@
         LdifToken commentToken = this.scanner.matchComment();
         if ( commentToken != null )
         {
-            LdifToken sepToken = this.scanner.matchSep();
-            record.addComment( new LdifCommentLine( commentToken.getOffset(), getValueOrNull(
commentToken ),
-                getValueOrNull( sepToken ) ) );
+            while ( commentToken != null )
+            {
+                LdifToken sepToken = this.scanner.matchSep();
+                record.addComment( new LdifCommentLine( commentToken.getOffset(), getValueOrNull(
commentToken ),
+                    getValueOrNull( sepToken ) ) );
+                commentToken = this.scanner.matchComment();
+            }
             return true;
         }
         else



Mime
View raw message