This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git
The following commit(s) were added to refs/heads/master by this push:
new bc64fb5 CSV-243 CSVFormat withTrim() and withIgnoreSurroundingSpaces()
bc64fb5 is described below
commit bc64fb569cfba9f8d289d526e879f985fb8b3cf4
Author: Sebb <[email protected]>
AuthorDate: Sun Jun 16 12:51:00 2019 +0100
CSV-243 CSVFormat withTrim() and withIgnoreSurroundingSpaces()
need better docs
---
src/main/java/org/apache/commons/csv/CSVFormat.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java
b/src/main/java/org/apache/commons/csv/CSVFormat.java
index 263943f..4c2540e 100644
--- a/src/main/java/org/apache/commons/csv/CSVFormat.java
+++ b/src/main/java/org/apache/commons/csv/CSVFormat.java
@@ -1067,6 +1067,8 @@ public final class CSVFormat implements Serializable {
/**
* Returns whether to trim leading and trailing blanks.
+ * This is used by {@link #print(Object, Appendable, boolean)}
+ * Also by {@link CSVParser#addRecordValue(boolean)}
*
* @return whether to trim leading and trailing blanks.
*/
@@ -1197,7 +1199,7 @@ public final class CSVFormat implements Serializable {
/**
* Prints the {@code value} as the next value on the line to {@code out}.
The value will be escaped or encapsulated
* as needed. Useful when one wants to avoid creating CSVPrinters.
- *
+ * Trims the value if {@link #getTrim()} is true
* @param value
* value to output.
* @param out
@@ -2294,7 +2296,8 @@ public final class CSVFormat implements Serializable {
}
/**
- * Returns a new {@code CSVFormat} to trim leading and trailing blanks
when printing.
+ * Returns a new {@code CSVFormat} to trim leading and trailing blanks.
+ * See {@link #getTrim()} for details of where this is used.
*
* @return A new CSVFormat that is equal to this but with the trim setting
on.
* @since 1.3
@@ -2304,10 +2307,11 @@ public final class CSVFormat implements Serializable {
}
/**
- * Returns a new {@code CSVFormat} with whether to trim leading and
trailing blanks when printing.
+ * Returns a new {@code CSVFormat} with whether to trim leading and
trailing blanks.
+ * See {@link #getTrim()} for details of where this is used.
*
* @param trim
- * whether to trim leading and trailing blanks when printing.
+ * whether to trim leading and trailing blanks.
*
* @return A new CSVFormat that is equal to this but with the specified
trim setting.
* @since 1.3