mirror of
https://github.com/apache/commons-csv.git
synced 2025-02-06 10:09:08 +00:00
Checkstyle: trailing spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1485799 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
67b778e455
commit
e5d7b21456
@ -20,13 +20,13 @@
|
||||
This file is used by the maven-changes-plugin to generate the release notes.
|
||||
Useful ways of finding items to add to this file are:
|
||||
|
||||
1. Add items when you fix a bug or add a feature (this makes the
|
||||
1. Add items when you fix a bug or add a feature (this makes the
|
||||
release process easy :-).
|
||||
|
||||
2. Do a JIRA search for tickets closed since the previous release.
|
||||
|
||||
3. Use the report generated by the maven-changelog-plugin to see all
|
||||
SVN commits. Set the project.properties' maven.changelog.range
|
||||
SVN commits. Set the project.properties' maven.changelog.range
|
||||
property to the number of days since the last release.
|
||||
|
||||
|
||||
@ -41,6 +41,6 @@ The <action> type attribute can be add,update,fix,remove.
|
||||
|
||||
<release version="1.0" date="TBD" description="First release">
|
||||
</release>
|
||||
|
||||
|
||||
</body>
|
||||
</document>
|
||||
|
@ -588,7 +588,7 @@ public class CSVFormat implements Serializable {
|
||||
* <tt>true</tt> when the parser should skip empty lines
|
||||
* @param recordSeparator
|
||||
* the line separator to use for output
|
||||
* @param nullToString
|
||||
* @param nullToString
|
||||
* the String to use to write <code>null</code> values.
|
||||
* @param header
|
||||
* the header
|
||||
|
@ -174,7 +174,7 @@ public class CSVPrinter implements Flushable, Closeable {
|
||||
} else {
|
||||
out.append(value, offset, offset + len);
|
||||
}
|
||||
newRecord = false;
|
||||
newRecord = false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -84,9 +84,9 @@ abstract class Lexer {
|
||||
* The current character must be the escape character.
|
||||
* On return, the next character is available by calling {@link ExtendedBufferedReader#getLastChar()}
|
||||
* on the input stream.
|
||||
*
|
||||
* @return the unescaped character (as an int) or {@link END_OF_STREAM} if char following the escape is invalid.
|
||||
* @throws IOException if there is a problem reading the stream or the end of stream is detected:
|
||||
*
|
||||
* @return the unescaped character (as an int) or {@link END_OF_STREAM} if char following the escape is invalid.
|
||||
* @throws IOException if there is a problem reading the stream or the end of stream is detected:
|
||||
* the escape character is not allowed at end of strem
|
||||
*/
|
||||
int readEscape() throws IOException {
|
||||
@ -186,7 +186,7 @@ abstract class Lexer {
|
||||
boolean isCommentStart(final int c) {
|
||||
return c == commmentStart;
|
||||
}
|
||||
|
||||
|
||||
private boolean isMetaChar(final int c) {
|
||||
return c == delimiter
|
||||
|| c == escape
|
||||
|
@ -31,7 +31,7 @@
|
||||
<item name="Download" href="/downloads.html"/>
|
||||
<item name="Wiki" href="http://wiki.apache.org/commons/CSV"/>
|
||||
</menu>
|
||||
|
||||
|
||||
<menu name="Development">
|
||||
<item name="History" href="/changes-report.html"/>
|
||||
<item name="Mailing Lists" href="/mail-lists.html"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!--
|
||||
<!--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@ -7,9 +7,9 @@
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<body>
|
||||
<section name="Download CSV">
|
||||
|
||||
|
||||
<subsection name="Releases">
|
||||
<p>
|
||||
There are currently no official downloads, and will not be until CSV moves out of the Sandbox.
|
||||
|
@ -29,8 +29,8 @@ limitations under the License.
|
||||
Iterable<CSVRecord> parser = CSVFormat.EXCEL.parse(in);
|
||||
for (CSVRecord record : parser) {
|
||||
...
|
||||
}</source>
|
||||
<p>Other formats are available, please consult the Javadoc for <a href="apidocs/org/apache/commons/csv/CSVFormat.html">CSVFormat</a> and
|
||||
}</source>
|
||||
<p>Other formats are available, please consult the Javadoc for <a href="apidocs/org/apache/commons/csv/CSVFormat.html">CSVFormat</a> and
|
||||
<a href="apidocs/org/apache/commons/csv/CSVParser.html">CSVParser</a></p>
|
||||
</section>
|
||||
|
||||
|
@ -48,7 +48,7 @@ limitations under the License.
|
||||
|
||||
<section name="Overview">
|
||||
<p>
|
||||
<a href="index.html">Commons CSV (Sandbox)</a> shares mailing lists with all the other
|
||||
<a href="index.html">Commons CSV (Sandbox)</a> shares mailing lists with all the other
|
||||
<a href="http://commons.apache.org/components.html">Commons Components</a>.
|
||||
To make it easier for people to only read messages related to components they are interested in,
|
||||
the convention in Commons is to prefix the subject line of messages with the component's name,
|
||||
@ -68,8 +68,8 @@ limitations under the License.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Note:</strong> please don't send patches or attachments to any of the mailing lists.
|
||||
Patches are best handled via the <a href="issue-tracking.html">Issue Tracking</a> system.
|
||||
Otherwise, please upload the file to a public server and include the URL in the mail.
|
||||
Patches are best handled via the <a href="issue-tracking.html">Issue Tracking</a> system.
|
||||
Otherwise, please upload the file to a public server and include the URL in the mail.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@ -185,10 +185,10 @@ limitations under the License.
|
||||
General announcements of Apache project releases.
|
||||
<br /><br />
|
||||
</td>
|
||||
<td><a class="externalLink" href="mailto:announce-subscribe@apache.org">Subscribe</a></td>
|
||||
<td><a class="externalLink" href="mailto:announce-unsubscribe@apache.org">Unsubscribe</a></td>
|
||||
<td><a class="externalLink" href="mailto:announce-subscribe@apache.org">Subscribe</a></td>
|
||||
<td><a class="externalLink" href="mailto:announce-unsubscribe@apache.org">Unsubscribe</a></td>
|
||||
<td><i>read only</i></td>
|
||||
<td><a class="externalLink" href="http://mail-archives.apache.org/mod_mbox/www-announce/">mail-archives.apache.org</a></td>
|
||||
<td><a class="externalLink" href="http://mail-archives.apache.org/mod_mbox/www-announce/">mail-archives.apache.org</a></td>
|
||||
<td><a class="externalLink" href="http://markmail.org/list/org.apache.announce/">markmail.org</a><br />
|
||||
<a class="externalLink" href="http://old.nabble.com/Apache-News-and-Announce-f109.html">old.nabble.com</a><br />
|
||||
<a class="externalLink" href="http://www.mail-archive.com/announce@apache.org/">www.mail-archive.com</a><br />
|
||||
|
@ -91,7 +91,7 @@ public class CSVFileParserTest {
|
||||
// first line starts with csv data file name
|
||||
final BufferedReader csvFile = new BufferedReader(new FileReader(new File(BASE, split[0])));
|
||||
final CSVFormatBuilder builder = CSVFormat.newBuilder(',').withQuoteChar('"');
|
||||
CSVFormat format = builder.build();
|
||||
CSVFormat format = builder.build();
|
||||
boolean checkComments = false;
|
||||
for(int i=1; i < split.length; i++) {
|
||||
final String option = split[i];
|
||||
|
@ -32,8 +32,8 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CSVFormatBuilderTest {
|
||||
@ -49,7 +49,7 @@ public class CSVFormatBuilderTest {
|
||||
public void testCommentStart() {
|
||||
assertEquals('?', builder.withCommentStart('?').build().getCommentStart().charValue());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testCopiedFormatIsEqualToOriginal() {
|
||||
final CSVFormat copyOfRCF4180 = CSVFormat.newBuilder(RFC4180).build();
|
||||
@ -65,12 +65,12 @@ public class CSVFormatBuilderTest {
|
||||
final CSVFormat newFormat2 = RFC4180.toBuilder().withDelimiter('!').build();
|
||||
assertTrue(newFormat2.getDelimiter() != RFC4180.getDelimiter());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDelimiter() {
|
||||
assertEquals('?', builder.withDelimiter('?').build().getDelimiter());
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void testDelimiterSameAsCommentStartThrowsException() {
|
||||
builder.withDelimiter('!').withCommentStart('!').build();
|
||||
@ -85,7 +85,7 @@ public class CSVFormatBuilderTest {
|
||||
public void testEscape() {
|
||||
assertEquals('?', builder.withEscape('?').build().getEscape().charValue());
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void testEscapeSameAsCommentStartThrowsException() {
|
||||
builder.withEscape('!').withCommentStart('!').build();
|
||||
@ -101,7 +101,7 @@ public class CSVFormatBuilderTest {
|
||||
public void testHeaderReferenceCannotEscape() {
|
||||
final String[] header = new String[]{"one", "tow", "three"};
|
||||
builder.withHeader(header);
|
||||
|
||||
|
||||
final CSVFormat firstFormat = builder.build();
|
||||
final CSVFormat secondFormat = builder.build();
|
||||
assertNotSame(header, firstFormat.getHeader());
|
||||
@ -117,7 +117,7 @@ public class CSVFormatBuilderTest {
|
||||
public void testIgnoreSurroundingSpaces() {
|
||||
assertFalse(builder.withIgnoreSurroundingSpaces(false).build().getIgnoreSurroundingSpaces());
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testNewFormatCRThrowsException() {
|
||||
CSVFormat.newBuilder(CR);
|
||||
@ -127,7 +127,7 @@ public class CSVFormatBuilderTest {
|
||||
public void testNewFormatLFThrowsException() {
|
||||
CSVFormat.newBuilder(LF);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testQuoteChar() {
|
||||
assertEquals('?', builder.withQuoteChar('?').build().getQuoteChar().charValue());
|
||||
@ -137,7 +137,7 @@ public class CSVFormatBuilderTest {
|
||||
public void testQuoteCharSameAsCommentStartThrowsException() {
|
||||
builder.withQuoteChar('!').withCommentStart('!').build();
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void testQuoteCharSameAsCommentStartThrowsExceptionForWrapperType() {
|
||||
// Cannot assume that callers won't use different Character objects
|
||||
@ -168,7 +168,7 @@ public class CSVFormatBuilderTest {
|
||||
public void testRecoardSeparator() {
|
||||
assertEquals("?", builder.withRecordSeparator("?").build().getRecordSeparator());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testRFC4180() {
|
||||
assertEquals(null, RFC4180.getCommentStart());
|
||||
@ -179,7 +179,7 @@ public class CSVFormatBuilderTest {
|
||||
assertEquals(null, RFC4180.getQuotePolicy());
|
||||
assertEquals("\r\n", RFC4180.getRecordSeparator());
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testWithCommentStartCRThrowsException() {
|
||||
builder.withCommentStart(CR).build();
|
||||
@ -194,7 +194,7 @@ public class CSVFormatBuilderTest {
|
||||
public void testWithEscapeCRThrowsExceptions() {
|
||||
builder.withEscape(CR).build();
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testWithQuoteLFThrowsException() {
|
||||
builder.withQuoteChar(LF).build();
|
||||
|
@ -29,8 +29,8 @@ import java.io.ObjectOutputStream;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CSVFormatTest {
|
||||
@ -66,7 +66,7 @@ public class CSVFormatTest {
|
||||
assertEquals("trim", CSVFormat.DEFAULT.getIgnoreSurroundingSpaces(), format.getIgnoreSurroundingSpaces());
|
||||
assertEquals("empty lines", CSVFormat.DEFAULT.getIgnoreEmptyLines(), format.getIgnoreEmptyLines());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testEquals() {
|
||||
final CSVFormat right = CSVFormat.DEFAULT;
|
||||
@ -78,7 +78,7 @@ public class CSVFormatTest {
|
||||
assertEquals(right, right);
|
||||
assertEquals(right, left);
|
||||
assertEquals(left, right);
|
||||
|
||||
|
||||
assertEquals(right.hashCode(), right.hashCode());
|
||||
assertEquals(right.hashCode(), left.hashCode());
|
||||
}
|
||||
@ -207,7 +207,7 @@ public class CSVFormatTest {
|
||||
final CSVFormat left = CSVFormat.newBuilder(right)
|
||||
.withHeader("Three", "Two", "One")
|
||||
.build();
|
||||
|
||||
|
||||
assertNotEquals(right, left);
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,8 @@ import static org.apache.commons.csv.Token.Type.TOKEN;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
class CSVLexer1 extends Lexer {
|
||||
|
@ -26,8 +26,8 @@ import static org.apache.commons.csv.Token.Type.TOKEN;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
class CSVLexer1306663 extends Lexer {
|
||||
|
@ -26,8 +26,8 @@ import static org.apache.commons.csv.Token.Type.TOKEN;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
class CSVLexer1306667 extends Lexer {
|
||||
|
@ -32,8 +32,8 @@ import java.util.Random;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class CSVPrinterTest {
|
||||
|
@ -28,8 +28,8 @@ import java.io.StringReader;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class ExtendedBufferedReaderTest {
|
||||
|
@ -76,7 +76,7 @@ public class PerformanceTest {
|
||||
final InputStream input = new GZIPInputStream(new FileInputStream("src/test/resources/perf/worldcitiespop.txt.gz"));
|
||||
final OutputStream output = new FileOutputStream(BIG_FILE);
|
||||
IOUtils.copy(input, output);
|
||||
System.out.println(String.format("Decompressed test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length()));
|
||||
System.out.println(String.format("Decompressed test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length()));
|
||||
}
|
||||
final int argc = args.length;
|
||||
String tests[];
|
||||
|
@ -24,7 +24,7 @@ import org.junit.Assert;
|
||||
|
||||
/**
|
||||
* Utility methods for test cases
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class Utils {
|
||||
|
@ -37,9 +37,9 @@ import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Tests performance.
|
||||
*
|
||||
*
|
||||
* To run this test, use: mvn test -Dtest=PeformanceTest
|
||||
*
|
||||
*
|
||||
* @version $Id$
|
||||
*/
|
||||
public class PerformanceTest {
|
||||
|
Loading…
x
Reference in New Issue
Block a user