commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1397077 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
Date Thu, 11 Oct 2012 14:29:13 GMT
Author: ggregory
Date: Thu Oct 11 14:29:12 2012
New Revision: 1397077

URL: http://svn.apache.org/viewvc?rev=1397077&view=rev
Log:
Replace magic char with constant DOUBLE_QUOTE.

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.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=1397077&r1=1397076&r2=1397077&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 Thu Oct 11
14:29:12 2012
@@ -29,6 +29,8 @@ import java.io.StringWriter;
  */
 public class CSVFormat implements Serializable {
 
+    private static final char DOUBLE_QUOTE = '"';
+
     private static final char COMMA = ',';
 
     private static final long serialVersionUID = 1L;
@@ -73,7 +75,7 @@ public class CSVFormat implements Serial
     public static final CSVFormat DEFAULT =
             PRISTINE.
             withDelimiter(COMMA)
-            .withEncapsulator('"')
+            .withEncapsulator(DOUBLE_QUOTE)
             .withEmptyLinesIgnored(true)
             .withLineSeparator(CRLF);
 
@@ -89,7 +91,7 @@ public class CSVFormat implements Serial
     public static final CSVFormat RFC4180 =
             PRISTINE.
             withDelimiter(COMMA)
-            .withEncapsulator('"')
+            .withEncapsulator(DOUBLE_QUOTE)
             .withLineSeparator(CRLF);
 
     /**
@@ -105,14 +107,14 @@ public class CSVFormat implements Serial
     public static final CSVFormat EXCEL =
             PRISTINE
             .withDelimiter(COMMA)
-            .withEncapsulator('"')
+            .withEncapsulator(DOUBLE_QUOTE)
             .withLineSeparator(CRLF);
 
     /** Tab-delimited format, with quote; leading and trailing spaces ignored. */
     public static final CSVFormat TDF =
             PRISTINE
             .withDelimiter('\t')
-            .withEncapsulator('"')
+            .withEncapsulator(DOUBLE_QUOTE)
             .withSurroundingSpacesIgnored(true)
             .withEmptyLinesIgnored(true)
             .withLineSeparator(CRLF);



Mime
View raw message