My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 9 attachment: cache_line.separator.patch (1.0 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/src/main/java/com/googlecode/jcsv/writer/internal/CSVWriterImpl.java b/src/main/java/com/googlecode/jcsv/writer/internal/CSVWriterImpl.java
index 6fc226f..5e057df 100644
--- a/src/main/java/com/googlecode/jcsv/writer/internal/CSVWriterImpl.java
+++ b/src/main/java/com/googlecode/jcsv/writer/internal/CSVWriterImpl.java
@@ -15,12 +15,14 @@
private final CSVStrategy strategy;
private final CSVEntryConverter<E> entryConverter;
private final CSVColumnJoiner columnJoiner;
+ private final String lineSeparator;

CSVWriterImpl(CSVWriterBuilder<E> builder) {
this.writer = builder.writer;
this.strategy = builder.strategy;
this.entryConverter = builder.entryConverter;
this.columnJoiner = builder.columnJoiner;
+ lineSeparator = System.getProperty("line.separator");
}

@Override
@@ -38,7 +40,7 @@
String line = columnJoiner.joinColumns(columns, strategy);

sb.append(line);
- sb.append(System.getProperty("line.separator"));
+ sb.append(lineSeparator);

writer.append(sb.toString());
}
Powered by Google Project Hosting