You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/04/17 12:28:33 UTC
svn commit: r1468825 -
/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
Author: sebb
Date: Wed Apr 17 10:28:33 2013
New Revision: 1468825
URL: http://svn.apache.org/r1468825
Log:
Standardise on recordSeparator; fix incorrect Javadoc comments
Modified:
commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1468825&r1=1468824&r2=1468825&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Wed Apr 17 10:28:33 2013
@@ -98,15 +98,15 @@ public class CSVFormat implements Serial
* @param nullToString TODO
* @param header
* the header
- * @param lineSeparator
- * the line separator to use for output
+ * @param recordSeparator
+ * the record separator to use for output
* @throws IllegalArgumentException if the delimiter is a line break character
*/
// package protected for use by test code
CSVFormatBuilder(final char delimiter, final Character quoteChar,
final Quote quotePolicy, final Character commentStart,
final Character escape, final boolean ignoreSurroundingSpaces,
- final boolean ignoreEmptyLines, final String lineSeparator,
+ final boolean ignoreEmptyLines, final String recordSeparator,
String nullToString, final String[] header) {
if (isLineBreak(delimiter)) {
throw new IllegalArgumentException("The delimiter cannot be a line break");
@@ -118,7 +118,7 @@ public class CSVFormat implements Serial
this.escape = escape;
this.ignoreSurroundingSpaces = ignoreSurroundingSpaces;
this.ignoreEmptyLines = ignoreEmptyLines;
- this.recordSeparator = lineSeparator;
+ this.recordSeparator = recordSeparator;
this.nullToString = nullToString;
this.header = header;
}
@@ -431,7 +431,7 @@ public class CSVFormat implements Serial
* <li>withDelimiter(',')</li>
* <li>withQuoteChar('"')</li>
* <li>withEmptyLinesIgnored(true)</li>
- * <li>withLineSeparator(CRLF)</li>
+ * <li>withRecordSeparator(CRLF)</li>
* </ul>
*
* Shortcut for {@code CSVFormat.newBuilder(CSVFormat.DEFAULT)}
@@ -462,7 +462,7 @@ public class CSVFormat implements Serial
* <ul>
* <li>withDelimiter(',')</li>
* <li>withQuoteChar('"')</li>
- * <li>withLineSeparator(CRLF)</li>
+ * <li>withRecordSeparator(CRLF)</li>
* </ul>
*/
public static final CSVFormat RFC4180 =
@@ -476,7 +476,7 @@ public class CSVFormat implements Serial
* <ul>
* <li>withDelimiter(',')</li>
* <li>withQuoteChar('"')</li>
- * <li>withLineSeparator(CRLF)</li>
+ * <li>withRecordSeparator(CRLF)</li>
* </ul>
* <h3>Additional:</h3>
* <ul>
@@ -500,7 +500,7 @@ public class CSVFormat implements Serial
* <ul>
* <li>withDelimiter(',')</li>
* <li>withQuoteChar('"')</li>
- * <li>withLineSeparator(CRLF)</li>
+ * <li>withRecordSeparator(CRLF)</li>
* </ul>
* Note: this is currently the same as RFC4180
*/
Re: svn commit: r1468825 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
Posted by Benedikt Ritter <br...@apache.org>.
Thanks :)
2013/4/17 <se...@apache.org>
> Author: sebb
> Date: Wed Apr 17 10:28:33 2013
> New Revision: 1468825
>
> URL: http://svn.apache.org/r1468825
> Log:
> Standardise on recordSeparator; fix incorrect Javadoc comments
>
> Modified:
>
> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
>
> Modified:
> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
> URL:
> http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1468825&r1=1468824&r2=1468825&view=diff
>
> ==============================================================================
> ---
> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
> (original)
> +++
> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
> Wed Apr 17 10:28:33 2013
> @@ -98,15 +98,15 @@ public class CSVFormat implements Serial
> * @param nullToString TODO
> * @param header
> * the header
> - * @param lineSeparator
> - * the line separator to use for output
> + * @param recordSeparator
> + * the record separator to use for output
> * @throws IllegalArgumentException if the delimiter is a line
> break character
> */
> // package protected for use by test code
> CSVFormatBuilder(final char delimiter, final Character quoteChar,
> final Quote quotePolicy, final Character commentStart,
> final Character escape, final boolean
> ignoreSurroundingSpaces,
> - final boolean ignoreEmptyLines, final String
> lineSeparator,
> + final boolean ignoreEmptyLines, final String
> recordSeparator,
> String nullToString, final String[] header) {
> if (isLineBreak(delimiter)) {
> throw new IllegalArgumentException("The delimiter cannot
> be a line break");
> @@ -118,7 +118,7 @@ public class CSVFormat implements Serial
> this.escape = escape;
> this.ignoreSurroundingSpaces = ignoreSurroundingSpaces;
> this.ignoreEmptyLines = ignoreEmptyLines;
> - this.recordSeparator = lineSeparator;
> + this.recordSeparator = recordSeparator;
> this.nullToString = nullToString;
> this.header = header;
> }
> @@ -431,7 +431,7 @@ public class CSVFormat implements Serial
> * <li>withDelimiter(',')</li>
> * <li>withQuoteChar('"')</li>
> * <li>withEmptyLinesIgnored(true)</li>
> - * <li>withLineSeparator(CRLF)</li>
> + * <li>withRecordSeparator(CRLF)</li>
> * </ul>
> *
> * Shortcut for {@code CSVFormat.newBuilder(CSVFormat.DEFAULT)}
> @@ -462,7 +462,7 @@ public class CSVFormat implements Serial
> * <ul>
> * <li>withDelimiter(',')</li>
> * <li>withQuoteChar('"')</li>
> - * <li>withLineSeparator(CRLF)</li>
> + * <li>withRecordSeparator(CRLF)</li>
> * </ul>
> */
> public static final CSVFormat RFC4180 =
> @@ -476,7 +476,7 @@ public class CSVFormat implements Serial
> * <ul>
> * <li>withDelimiter(',')</li>
> * <li>withQuoteChar('"')</li>
> - * <li>withLineSeparator(CRLF)</li>
> + * <li>withRecordSeparator(CRLF)</li>
> * </ul>
> * <h3>Additional:</h3>
> * <ul>
> @@ -500,7 +500,7 @@ public class CSVFormat implements Serial
> * <ul>
> * <li>withDelimiter(',')</li>
> * <li>withQuoteChar('"')</li>
> - * <li>withLineSeparator(CRLF)</li>
> + * <li>withRecordSeparator(CRLF)</li>
> * </ul>
> * Note: this is currently the same as RFC4180
> */
>
>
>
--
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter