You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2012/10/12 03:34:48 UTC
Re: svn commit: r1397078 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
On 11 October 2012 15:30, <gg...@apache.org> wrote:
> 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");
What about these magic chars?
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: svn commit: r1397078 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
Posted by Gary Gregory <ga...@gmail.com>.
On Oct 11, 2012, at 21:35, sebb <se...@gmail.com> wrote:
> On 11 October 2012 15:30, <gg...@apache.org> wrote:
>> 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");
>
> What about these magic chars?
I need more hats and rabbits!
Will do later unless someone else gets to it.
G
>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org