commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1306342 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/CSVParser.java test/java/org/apache/commons/csv/CSVParserTest.java
Date Wed, 28 Mar 2012 14:05:25 GMT
Author: sebb
Date: Wed Mar 28 14:05:25 2012
New Revision: 1306342

URL: http://svn.apache.org/viewvc?rev=1306342&view=rev
Log:
CSV-84 Clarify comment handling
Test was wrong; line comment should have been dropped entirely.
Fix record handling accordingly

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java

Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java?rev=1306342&r1=1306341&r2=1306342&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Wed Mar 28
14:05:25 2012
@@ -155,6 +155,7 @@ public class CSVParser implements Iterab
                 case INVALID:
                     throw new IOException("(line " + getLineNumber() + ") invalid parse sequence");
                 case COMMENT: // Ignored currently
+                    reusableToken.type = TOKEN; // Read another token
                     break;
             }
         } while (reusableToken.type == TOKEN);

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java?rev=1306342&r1=1306341&r2=1306342&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVParserTest.java Wed Mar
28 14:05:25 2012
@@ -352,7 +352,6 @@ public class CSVParserTest {
         String[][] res_comments = {
                 {"a", "b"},
                 {"\n", " "},
-                {},
         };
 
         format = CSVFormat.DEFAULT.withCommentStart('#');



Mime
View raw message