[
https://issues.apache.org/jira/browse/CSV-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14307694#comment-14307694
]
Niels Bischof edited comment on CSV-148 at 2/5/15 6:23 PM:
-----------------------------------------------------------
I prepared a patch.
How can I submit?
base is:
{noformat:title=trunk}
URL: http://svn.apache.org/repos/asf/commons/proper/csv/trunk
Repository Root: http://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1657615
Node Kind: directory
Schedule: normal
Last Changed Author: britter
Last Changed Rev: 1651287
Last Changed Date: 2015-01-13 08:05:25 +0100 (Tue, 13 Jan 2015)
{noformat}
was (Author: nbischof):
I prepared a patch.
How can I submit?
> CSVFormat.ignoreSurroundingSpaces is ignored itself
> ---------------------------------------------------
>
> 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: Patch Needed
>
>
> 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
(v6.3.4#6332)