From 8e9fb0e9896da664f28efe5d32c225ecfc473f70 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Mon, 26 Mar 2012 23:32:18 +0000 Subject: [PATCH] Add more info to toString() method; use space separator for clarity git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1305669 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/csv/CSVFormat.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index ac3c0a43..d96b6832 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -419,17 +419,23 @@ public class CSVFormat implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("Delimiter=<").append(delimiter).append('>'); if (isEscaping()) { - sb.append(','); + sb.append(' '); sb.append("Escape=<").append(escape).append('>'); } if (isEncapsulating()) { - sb.append(','); + sb.append(' '); sb.append("Encapsulator=<").append(encapsulator).append('>'); } if (isCommentingEnabled()) { - sb.append(','); + sb.append(' '); sb.append("CommentStart=<").append(commentStart).append('>'); } + if (isEmptyLinesIgnored()) { + sb.append(" EmptyLines:ignored"); + } + if (isSurroundingSpacesIgnored()) { + sb.append(" SurroundingSpaces:ignored"); + } return sb.toString(); }