You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Morten Lynge (JIRA)" <ji...@apache.org> on 2016/11/08 08:36:58 UTC

[jira] [Commented] (CSV-63) CSVPrinter always quotes empty string if it is the first on a line

    [ https://issues.apache.org/jira/browse/CSV-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15646909#comment-15646909 ] 

Morten Lynge commented on CSV-63:
---------------------------------

The issue is still in 1.4.

{code}
	@Test
	public void quotesOnFirstElement() throws IOException {
		StringWriter writer = new StringWriter();
		CSVPrinter printer = new CSVPrinter(writer, CSVFormat.EXCEL.withDelimiter(';'));
		printer.printRecord("", "", "");
		printer.close();
		assertEquals(";;", writer.toString()); // yields org.junit.ComparisonFailure: expected:<[];;> but was:<[""];;>
	}
{code}

{code:xml}
	<dependency>
		<groupId>org.apache.commons</groupId>
		<artifactId>commons-csv</artifactId>
		<version>1.4</version>
	</dependency>
{code}

> CSVPrinter always quotes empty string if it is the first on a line
> ------------------------------------------------------------------
>
>                 Key: CSV-63
>                 URL: https://issues.apache.org/jira/browse/CSV-63
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Printer
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: Patch Needed, 1.x
>
>
> CSVPrinter always quotes the empty string if it is the first on a line.
> This is inconsistent.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)