commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1398560 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/CSVFormat.java test/java/org/apache/commons/csv/CSVFileParserTest.java test/java/org/apache/commons/csv/CSVParserTest.java
Date Mon, 15 Oct 2012 22:57:51 GMT
Author: sebb
Date: Mon Oct 15 22:57:51 2012
New Revision: 1398560

URL: http://svn.apache.org/viewvc?rev=1398560&view=rev
Log:
PRISTINE can now be private as we have ctor which allows delimiter to be specified

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.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/CSVFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1398560&r1=1398559&r2=1398560&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Mon Oct 15
22:57:51 2012
@@ -61,7 +61,7 @@ public class CSVFormat implements Serial
     /**
      * Starting format; used for creating other formats.
      */
-    static final CSVFormat PRISTINE = new CSVFormat(COMMA, null, null, null, null, false,
false, null, null);
+    private static final CSVFormat PRISTINE = new CSVFormat(COMMA, null, null, null, null,
false, false, null, null);
 
     /**
      * Standard comma separated format, as for {@link #RFC4180} but allowing blank lines.

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java?rev=1398560&r1=1398559&r2=1398560&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFileParserTest.java Mon
Oct 15 22:57:51 2012
@@ -89,7 +89,7 @@ public class CSVFileParserTest {
         assertTrue(testName+" require 1 param", split.length >= 1);
          // first line starts with csv data file name
         final BufferedReader csvFile = new BufferedReader(new FileReader(new File(BASE, split[0])));
-        CSVFormat fmt = CSVFormat.PRISTINE.withDelimiter(',').withQuoteChar('"');
+        CSVFormat fmt = new CSVFormat(',').withQuoteChar('"');
         boolean checkComments = false;
         for(int i=1; i < split.length; i++) {
             final String option = split[i];

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=1398560&r1=1398559&r2=1398560&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 Mon Oct
15 22:57:51 2012
@@ -312,7 +312,7 @@ public class CSVParserTest {
         };
 
 
-        final CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withQuoteChar('\'').withEscape('/')
+        final CSVFormat format = new CSVFormat(',').withQuoteChar('\'').withEscape('/')
                                .withIgnoreEmptyLines(true).withLineSeparator(CRLF);
 
         final CSVParser parser = new CSVParser(code, format);
@@ -342,7 +342,7 @@ public class CSVParserTest {
         };
 
 
-        final CSVFormat format = CSVFormat.PRISTINE.withDelimiter(',').withEscape('/')
+        final CSVFormat format = new CSVFormat(',').withEscape('/')
                 .withIgnoreEmptyLines(true).withLineSeparator(CRLF);
 
         final CSVParser parser = new CSVParser(code, format);



Mime
View raw message