From a6a92598de5983c7278b0daba1a839e5a3db463b Mon Sep 17 00:00:00 2001
From: Benedikt Ritter
Date: Sun, 10 Aug 2014 08:50:05 +0000
Subject: [PATCH] Make checkstyle happy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1617066 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/java/org/apache/commons/csv/CSVFormat.java | 12 ++++++------
src/main/java/org/apache/commons/csv/CSVParser.java | 4 ++--
src/main/java/org/apache/commons/csv/CSVPrinter.java | 4 ++--
src/main/java/org/apache/commons/csv/CSVRecord.java | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java
index bf18a2cc..74f82b94 100644
--- a/src/main/java/org/apache/commons/csv/CSVFormat.java
+++ b/src/main/java/org/apache/commons/csv/CSVFormat.java
@@ -236,8 +236,8 @@ public final class CSVFormat implements Serializable {
* Default MySQL format used by the {@code SELECT INTO OUTFILE} and {@code LOAD DATA INFILE} operations.
*
*
- * This is a tab-delimited format with a LF character as the line separator. Values are not quoted and special characters
- * are escaped with '\'.
+ * This is a tab-delimited format with a LF character as the line separator. Values are not quoted and special
+ * characters are escaped with '\'.
*
*
*
@@ -958,8 +958,8 @@ public final class CSVFormat implements Serializable {
/**
* Sets the record separator of the format to the specified character.
*
- *
Note: This setting is only used during printing and does not affect parsing. Parsing currently
- * only works for inputs with '\n', '\r' and "\r\n"
+ * Note: This setting is only used during printing and does not affect parsing. Parsing
+ * currently only works for inputs with '\n', '\r' and "\r\n"
*
* @param recordSeparator
* the record separator to use for output.
@@ -973,8 +973,8 @@ public final class CSVFormat implements Serializable {
/**
* Sets the record separator of the format to the specified String.
*
- * Note: This setting is only used during printing and does not affect parsing. Parsing currently
- * only works for inputs with '\n', '\r' and "\r\n"
+ * Note: This setting is only used during printing and does not affect parsing. Parsing
+ * currently only works for inputs with '\n', '\r' and "\r\n"
*
* @param recordSeparator
* the record separator to use for output.
diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java
index 31c24748..4e82954e 100644
--- a/src/main/java/org/apache/commons/csv/CSVParser.java
+++ b/src/main/java/org/apache/commons/csv/CSVParser.java
@@ -324,7 +324,6 @@ public final class CSVParser implements Iterable, Closeable {
*/
public List getRecords() throws IOException {
CSVRecord rec;
- // can not use Java 7 diamond notation here, since JavaNCSS will fail, see https://jira.codehaus.org/browse/JAVANCSS-51
List records = new ArrayList();
while ((rec = this.nextRecord()) != null) {
records.add(rec);
@@ -364,7 +363,8 @@ public final class CSVParser implements Iterable, Closeable {
final String header = headerRecord[i];
final boolean containsHeader = hdrMap.containsKey(header);
final boolean emptyHeader = header == null || header.trim().isEmpty();
- if (containsHeader && (!emptyHeader || (emptyHeader && !this.format.getAllowMissingColumnNames()))) {
+ if (containsHeader &&
+ (!emptyHeader || (emptyHeader && !this.format.getAllowMissingColumnNames()))) {
throw new IllegalArgumentException("The header contains a duplicate name: \"" + header +
"\" in " + Arrays.toString(headerRecord));
}
diff --git a/src/main/java/org/apache/commons/csv/CSVPrinter.java b/src/main/java/org/apache/commons/csv/CSVPrinter.java
index d432b9ae..9567364b 100644
--- a/src/main/java/org/apache/commons/csv/CSVPrinter.java
+++ b/src/main/java/org/apache/commons/csv/CSVPrinter.java
@@ -427,8 +427,8 @@ public final class CSVPrinter implements Flushable, Closeable {
* Prints all the objects in the given array handling nested collections/arrays as records.
*
* If the given array only contains simple objects, this method will print a single record like
- * {@link #printRecord(Object...)}. If the given collections contains nested collections/arrays those nested elements
- * will each be printed as records using {@link #printRecord(Object...)}.
+ * {@link #printRecord(Object...)}. If the given collections contains nested collections/arrays those nested
+ * elements will each be printed as records using {@link #printRecord(Object...)}.
*
* Given the following data structure:
*
diff --git a/src/main/java/org/apache/commons/csv/CSVRecord.java b/src/main/java/org/apache/commons/csv/CSVRecord.java
index d40721d0..93affc5a 100644
--- a/src/main/java/org/apache/commons/csv/CSVRecord.java
+++ b/src/main/java/org/apache/commons/csv/CSVRecord.java
@@ -129,7 +129,7 @@ public final class CSVRecord implements Serializable, Iterable {
*
*
* @return the number of this record.
- * @see CSVParser#getCurrentLineNumber()
+ * @see CSVParser#getCurrentLineNumber()
*/
public long getRecordNumber() {
return recordNumber;