Skip to content

Commit 13092ba

Browse files
committed
Replace magic char with constant DOUBLE_QUOTE.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397077 13f79535-47bb-0310-9956-ffa450edef68
1 parent 4efb5ae commit 13092ba

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/main/java/org/apache/commons/csv/CSVFormat.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
*/
3030
public class CSVFormat implements Serializable {
3131

32+
private static final char DOUBLE_QUOTE = '"';
33+
3234
private static final char COMMA = ',';
3335

3436
private static final long serialVersionUID = 1L;
@@ -73,7 +75,7 @@ public class CSVFormat implements Serializable {
7375
public static final CSVFormat DEFAULT =
7476
PRISTINE.
7577
withDelimiter(COMMA)
76-
.withEncapsulator('"')
78+
.withEncapsulator(DOUBLE_QUOTE)
7779
.withEmptyLinesIgnored(true)
7880
.withLineSeparator(CRLF);
7981

@@ -89,7 +91,7 @@ public class CSVFormat implements Serializable {
8991
public static final CSVFormat RFC4180 =
9092
PRISTINE.
9193
withDelimiter(COMMA)
92-
.withEncapsulator('"')
94+
.withEncapsulator(DOUBLE_QUOTE)
9395
.withLineSeparator(CRLF);
9496

9597
/**
@@ -105,14 +107,14 @@ public class CSVFormat implements Serializable {
105107
public static final CSVFormat EXCEL =
106108
PRISTINE
107109
.withDelimiter(COMMA)
108-
.withEncapsulator('"')
110+
.withEncapsulator(DOUBLE_QUOTE)
109111
.withLineSeparator(CRLF);
110112

111113
/** Tab-delimited format, with quote; leading and trailing spaces ignored. */
112114
public static final CSVFormat TDF =
113115
PRISTINE
114116
.withDelimiter('\t')
115-
.withEncapsulator('"')
117+
.withEncapsulator(DOUBLE_QUOTE)
116118
.withSurroundingSpacesIgnored(true)
117119
.withEmptyLinesIgnored(true)
118120
.withLineSeparator(CRLF);

0 commit comments

Comments
 (0)