Skip to content

Commit 637ef14

Browse files
committed
Adding a minor optimisation as detailed in #SANDBOX-160 by Daniel Gredler.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/csv/trunk@427471 13f79535-47bb-0310-9956-ffa450edef68
1 parent ce34196 commit 637ef14

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/java/org/apache/commons/csv/CSVPrinter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ public void print(String value) {
214214
c = value.charAt(i);
215215
if (c == '"' || c == this.strategy.getDelimiter() || c == '\n' || c == '\r') {
216216
quote = true;
217+
c = value.charAt( value.length() - 1 );
218+
break;
217219
}
218220
}
219221
if (c == ' ' || c == '\f' || c == '\t') {

0 commit comments

Comments
 (0)