Author: ggregory Date: Wed Sep 12 04:14:01 2012 New Revision: 1383758 URL: http://svn.apache.org/viewvc?rev=1383758&view=rev Log: Last of the Checkstyle fixes.
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.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=1383758&r1=1383757&r2=1383758&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 Sep 12 04:14:01 2012 @@ -182,18 +182,18 @@ public class CSVFormat implements Serial */ void validate() throws IllegalArgumentException { if (delimiter == encapsulator) { - throw new IllegalArgumentException("The encapsulator character and the delimiter cannot be the same (\"" - + encapsulator + "\")"); + throw new IllegalArgumentException("The encapsulator character and the delimiter cannot be the same (\"" + + encapsulator + "\")"); } if (delimiter == escape) { - throw new IllegalArgumentException("The escape character and the delimiter cannot be the same (\"" - + escape + "\")"); + throw new IllegalArgumentException("The escape character and the delimiter cannot be the same (\"" + + escape + "\")"); } if (delimiter == commentStart) { - throw new IllegalArgumentException("The comment start character and the delimiter cannot be the same (\"" - + commentStart + "\")"); + throw new IllegalArgumentException("The comment start character and the delimiter cannot be the same (\"" + + commentStart + "\")"); } if (encapsulator != DISABLED && encapsulator == commentStart) { @@ -202,8 +202,8 @@ public class CSVFormat implements Serial } if (escape != DISABLED && escape == commentStart) { - throw new IllegalArgumentException("The comment start and the escape character cannot be the same (\"" - + commentStart + "\")"); + throw new IllegalArgumentException("The comment start and the escape character cannot be the same (\"" + + commentStart + "\")"); } } Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java?rev=1383758&r1=1383757&r2=1383758&view=diff ============================================================================== --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java (original) +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVLexer.java Wed Sep 12 04:14:01 2012 @@ -216,15 +216,15 @@ class CSVLexer extends Lexer { return tkn; } else if (!isWhitespace(c)) { // error invalid char between token and next delimiter - throw new IOException("(line " + getLineNumber() - + ") invalid char between encapsulated token and delimiter"); + throw new IOException("(line " + getLineNumber() + + ") invalid char between encapsulated token and delimiter"); } } } } else if (isEndOfFile(c)) { // error condition (end of file before end of token) - throw new IOException("(startline " + startLineNumber - + ") EOF reached before encapsulated token finished"); + throw new IOException("(startline " + startLineNumber + + ") EOF reached before encapsulated token finished"); } else { // consume character tkn.content.append((char) c); Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java?rev=1383758&r1=1383757&r2=1383758&view=diff ============================================================================== --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java (original) +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Wed Sep 12 04:14:01 2012 @@ -183,8 +183,8 @@ public class CSVParser implements Iterab } while (reusableToken.type == TOKEN); if (!record.isEmpty()) { - result = new CSVRecord(record.toArray(new String[record.size()]), headerMapping, sb == null ? null - : sb.toString()); + final String comment = sb == null ? null : sb.toString(); + result = new CSVRecord(record.toArray(new String[record.size()]), headerMapping, comment); } return result; }