Skip to content

Commit

Permalink
Merge pull request #22 from xuchuanyin/bug_windows
Browse files Browse the repository at this point in the history
Fix bugs in running test in windows (fixed issue #21)
  • Loading branch information
jbax committed Oct 31, 2018
2 parents 27b9e54 + a3b5be5 commit 5548b52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -28,10 +28,13 @@ public static void generateHugeFile(File input, String inputEncoding, int timesT
return;
}

CsvParser parser = new CsvParser(new CsvParserSettings());
CsvParserSettings readerSettings = new CsvParserSettings();
readerSettings.getFormat().setLineSeparator("\n");
CsvParser parser = new CsvParser(readerSettings);

CsvWriterSettings settings = new CsvWriterSettings();
settings.setQuoteAllFields(true); //let's see how all parsers perform when the contents are enclosed within quotes.
settings.getFormat().setLineSeparator("\n");

CsvWriter writer = new CsvWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(hugeFile), inputEncoding)), settings);
long totalTime = 0L;
Expand Down
Expand Up @@ -31,7 +31,8 @@ protected UnivocityParser() {
@Override
public void processRows(final Reader input) {
CsvParserSettings settings = new CsvParserSettings();

settings.getFormat().setLineSeparator("\n");

//turning off features enabled by default
settings.getFormat().setLineSeparator("\n");
settings.setIgnoreLeadingWhitespaces(false);
Expand Down

0 comments on commit 5548b52

Please sign in to comment.