PRISTINE can now be private as we have ctor which allows delimiter to be specified

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398560 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-10-15 22:57:51 +00:00
parent 6f500d6067
commit 5c9b878dfd
3 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ public class CSVFormat implements Serializable {
/** /**
* Starting format; used for creating other formats. * 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. * Standard comma separated format, as for {@link #RFC4180} but allowing blank lines.

View File

@ -89,7 +89,7 @@ public class CSVFileParserTest {
assertTrue(testName+" require 1 param", split.length >= 1); assertTrue(testName+" require 1 param", split.length >= 1);
// first line starts with csv data file name // first line starts with csv data file name
final BufferedReader csvFile = new BufferedReader(new FileReader(new File(BASE, split[0]))); 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; boolean checkComments = false;
for(int i=1; i < split.length; i++) { for(int i=1; i < split.length; i++) {
final String option = split[i]; final String option = split[i];

View File

@ -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); .withIgnoreEmptyLines(true).withLineSeparator(CRLF);
final CSVParser parser = new CSVParser(code, format); 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); .withIgnoreEmptyLines(true).withLineSeparator(CRLF);
final CSVParser parser = new CSVParser(code, format); final CSVParser parser = new CSVParser(code, format);