commons-commits mailing list archives

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

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

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=1397078&r1=1397077&r2=1397078&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:30:04 2012
@@ -29,6 +29,8 @@ import java.io.StringWriter;
  */
 public class CSVFormat implements Serializable {
 
+    private static final char TAB = '\t';
+
     private static final char DOUBLE_QUOTE = '"';
 
     private static final char COMMA = ',';
@@ -113,7 +115,7 @@ public class CSVFormat implements Serial
     /** Tab-delimited format, with quote; leading and trailing spaces ignored. */
     public static final CSVFormat TDF =
             PRISTINE
-            .withDelimiter('\t')
+            .withDelimiter(TAB)
             .withEncapsulator(DOUBLE_QUOTE)
             .withSurroundingSpacesIgnored(true)
             .withEmptyLinesIgnored(true)
@@ -129,7 +131,7 @@ public class CSVFormat implements Serial
      */
     public static final CSVFormat MYSQL =
             PRISTINE
-            .withDelimiter('\t')
+            .withDelimiter(TAB)
             .withEscape('\\')
             .withLineSeparator("\n");
 



Mime
View raw message