You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/07/03 18:43:00 UTC

[jira] [Work logged] (CSV-148) CSVFormat.ignoreSurroundingSpaces is ignored when printing

     [ https://issues.apache.org/jira/browse/CSV-148?focusedWorklogId=618387&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-618387 ]

ASF GitHub Bot logged work on CSV-148:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jul/21 18:42
            Start Date: 03/Jul/21 18:42
    Worklog Time Spent: 10m 
      Work Description: garydgregory merged pull request #70:
URL: https://github.com/apache/commons-csv/pull/70


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 618387)
    Time Spent: 50m  (was: 40m)

> CSVFormat.ignoreSurroundingSpaces is ignored when printing
> ----------------------------------------------------------
>
>                 Key: CSV-148
>                 URL: https://issues.apache.org/jira/browse/CSV-148
>             Project: Commons CSV
>          Issue Type: Bug
>          Components: Printer
>    Affects Versions: 1.1
>         Environment: JDK 1.7
>            Reporter: Piotr Ciruk
>            Priority: Minor
>             Fix For: Review
>
>         Attachments: commons-csv_CSV-148.patch, commons-csv_CSV-148.patch
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> It seems that {{CSVFormat}}'s property {{ignoreSurroundingSpaces}} is not taken into consideration while printing out values using {{CSVPrinter}}.
> Given:
> {code}
> System.out.println(
> 	CSVFormat.DEFAULT
> 			.withIgnoreSurroundingSpaces(true)
> 			.format("",
> 				" ",
> 				" Single space on the left",
> 				"Single space on the right ",
> 				" Single spaces on both sides ",
> 				"   Multiple spaces on the left",
> 				"Multiple spaces on the right    ",
> 				"  Multiple spaces on both sides     ")
> );
> {code}
> Actual result:
> {code}
> ""," "," Single space on the left","Single space on the right "," Single spaces on both sides ","   Multiple spaces on the left","Multiple spaces on the right    ","  Multiple spaces on both sides     "
> {code}
> Expected result:
> {code}
> "","","Single space on the left","Single space on the right","Single spaces on both sides","Multiple spaces on the left","Multiple spaces on the right","Multiple spaces on both sides"
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)