Skip to content

Commit 0dbb499

Browse files
committed
Rename "encapsulator" to "quoteChar" so we have quoteChar and quotePolicy. Encapsulator makes me want to ask "encapsulate what"? fieldEncapsulator would be better but so verbose, quoteChar feels more to the point to me and provides symmetry with quotePolicy.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398016 13f79535-47bb-0310-9956-ffa450edef68
1 parent 17139b8 commit 0dbb499

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/org/apache/commons/csv/CSVFormat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public CSVFormat withQuoteChar(final Character quoteChar) {
284284
*
285285
* @return {@code true} if an quoteChar is defined
286286
*/
287-
public boolean isEncapsulating() {
287+
public boolean isQuoting() {
288288
return quoteChar != null;
289289
}
290290

@@ -547,7 +547,7 @@ public String toString() {
547547
sb.append(' ');
548548
sb.append("Escape=<").append(escape).append('>');
549549
}
550-
if (isEncapsulating()) {
550+
if (isQuoting()) {
551551
sb.append(' ');
552552
sb.append("Encapsulator=<").append(quoteChar).append('>');
553553
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public void printComment(final String comment) throws IOException {
135135
}
136136

137137
private void print(final CharSequence value, final int offset, final int len) throws IOException {
138-
if (format.isEncapsulating()) {
138+
if (format.isQuoting()) {
139139
printAndEncapsulate(value, offset, len);
140140
} else if (format.isEscaping()) {
141141
printAndEscape(value, offset, len);

0 commit comments

Comments
 (0)