Skip to content

Commit 119fdb6

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents cdb9618 + 8e24674 commit 119fdb6

22 files changed

Lines changed: 991 additions & 441 deletions

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414
# limitations under the License.
1515

1616
language: java
17-
sudo: false
18-
19-
script:
20-
- mvn
2117

2218
jdk:
23-
- openjdk7
2419
- oraclejdk8
2520
- oraclejdk9
2621

2722
after_success:
28-
- mvn -B -V -Ptravis-jacoco clean test jacoco:report coveralls:report
23+
- mvn -B -V clean test jacoco:report coveralls:report -Ptravis-jacoco
24+

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Getting Started
5050

5151
+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
5252
+ Make sure you have a [GitHub account](https://github.com/signup/free).
53-
+ If you're planning to implement a new feature it makes sense to discuss you're changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons CSV's scope.
53+
+ If you're planning to implement a new feature it makes sense to discuss your changes on the [dev list](https://commons.apache.org/mail-lists.html) first. This way you can make sure you're not wasting your time on something that isn't considered to be in Apache Commons CSV's scope.
5454
+ Submit a [Jira Ticket][jira] for your issue, assuming one does not already exist.
5555
+ Clearly describe the issue including steps to reproduce when it is a bug.
5656
+ Make sure you fill in the earliest version that you know has the issue.
@@ -107,7 +107,7 @@ Additional Resources
107107
+ [Apache Commons CSV JIRA project page][jira]
108108
+ [Contributor License Agreement][cla]
109109
+ [General GitHub documentation](https://help.github.com/)
110-
+ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
110+
+ [GitHub pull request documentation](https://help.github.com/articles/creating-a-pull-request/)
111111
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
112112
+ `#apache-commons` IRC channel on `irc.freenode.net`
113113

NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache Commons CSV
2-
Copyright 2005-2017 The Apache Software Foundation
2+
Copyright 2005-2018 The Apache Software Foundation
33

44
This product includes software developed at
55
The Apache Software Foundation (http://www.apache.org/).

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
Apache Commons CSV
4444
===================
4545

46-
[![Build Status](https://travis-ci.org/apache/commons-csv.svg?branch=master)](https://travis-ci.org/apache/commons-csv)
47-
[![Coverage Status](https://coveralls.io/repos/apache/commons-csv/badge.svg?branch=master)](https://coveralls.io/r/apache/commons-csv)
46+
[![Build Status](https://travis-ci.org/apache/commons-csv.svg)](https://travis-ci.org/apache/commons-csv)
47+
[![Coverage Status](https://coveralls.io/repos/apache/commons-csv/badge.svg)](https://coveralls.io/r/apache/commons-csv)
4848
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-csv/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-csv/)
49-
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
49+
[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-csv/1.6.svg)](https://javadoc.io/doc/org.apache.commons/commons-csv/1.6)
5050

5151
The Apache Commons CSV library provides a simple interface for reading and writing
5252
CSV files of various types.
@@ -68,7 +68,7 @@ Alternatively you can pull it from the central Maven repositories:
6868
<dependency>
6969
<groupId>org.apache.commons</groupId>
7070
<artifactId>commons-csv</artifactId>
71-
<version>1.5</version>
71+
<version>1.6</version>
7272
</dependency>
7373
```
7474

RELEASE-NOTES.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
Apache Commons CSV
2+
Version 1.6
3+
Release Notes
4+
5+
6+
INTRODUCTION:
7+
8+
This document contains the release notes for the 1.6 version of
9+
Apache Commons CSV. Commons CSV reads and writes files in variations of the
10+
Comma Separated Value (CSV) format.
11+
12+
CSV requires at least Java 7.
13+
14+
The Apache Commons CSV library provides a simple interface for reading and
15+
writing CSV files of various types.
16+
17+
Feature and bug fix release.
18+
19+
Changes in this version include:
20+
21+
NEW FEATURES
22+
==============
23+
24+
o CSV-217: Add autoFlush option for CsvPrinter. PR #24.
25+
Thanks to Korolyov Alexei.
26+
o CSV-220: Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator().
27+
Thanks to Gary Gregory.
28+
29+
FIXED BUGS
30+
============
31+
32+
o CSV-219: The behavior of quote char using is not similar as Excel does when
33+
the first string contains CJK char(s). Thanks to Zhang Hongda.
34+
o CSV-172: Don't quote cells just because they have UTF-8 encoded characters.
35+
Thanks to Andrew Pennebaker.
36+
o CSV-223: Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL.
37+
Thanks to Samuel Martin.
38+
o CSV-209: Create CSVFormat.ORACLE preset. Thanks to Gary Gregory.
39+
o CSV-224: Some multi-iterator parsing peek sequences incorrectly consume
40+
elements. Thanks to David Warshaw.
41+
o CSV-225: Parse method should avoid creating a redundant BufferedReader.
42+
Thanks to Anson Schwabecher.
43+
44+
CHANGES
45+
=========
46+
47+
o CSV-231: Add more documentation to CSVPrinter.
48+
49+
50+
Have fun!
51+
-Apache Commons CSV team
52+
53+
------------------------------------------------------------------------------
54+
155
Apache Commons CSV
256
Version 1.5
357
Release Notes

pom.xml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
<parent>
2121
<groupId>org.apache.commons</groupId>
2222
<artifactId>commons-parent</artifactId>
23-
<version>43</version>
23+
<version>47</version>
2424
</parent>
2525
<artifactId>commons-csv</artifactId>
26-
<version>1.6-SNAPSHOT</version>
26+
<version>1.7-SNAPSHOT</version>
2727
<name>Apache Commons CSV</name>
2828
<url>http://commons.apache.org/proper/commons-csv/</url>
2929
<description>
@@ -53,13 +53,13 @@ CSV files of various types.
5353
<dependency>
5454
<groupId>org.apache.commons</groupId>
5555
<artifactId>commons-lang3</artifactId>
56-
<version>3.7</version>
56+
<version>3.8.1</version>
5757
<scope>test</scope>
5858
</dependency>
5959
<dependency>
6060
<groupId>com.h2database</groupId>
6161
<artifactId>h2</artifactId>
62-
<version>1.4.196</version>
62+
<version>1.4.198</version>
6363
<scope>test</scope>
6464
</dependency>
6565
</dependencies>
@@ -134,24 +134,30 @@ CSV files of various types.
134134
</distributionManagement>
135135

136136
<properties>
137-
<commons.release.version>1.6</commons.release.version>
138-
<commons.release.desc>(Java 7+)</commons.release.desc>
137+
<commons.release.version>1.7</commons.release.version>
138+
<commons.release.desc>(Java 8)</commons.release.desc>
139139
<!-- The RC version used in the staging repository URL. -->
140140
<commons.rc.version>RC1</commons.rc.version>
141141
<commons.componentid>csv</commons.componentid>
142142
<commons.module.name>org.apache.commons.csv</commons.module.name>
143143
<commons.jira.id>CSV</commons.jira.id>
144144
<commons.jira.pid>12313222</commons.jira.pid>
145-
<maven.compiler.source>1.7</maven.compiler.source>
146-
<maven.compiler.target>1.7</maven.compiler.target>
145+
<project.inceptionYear>2005</project.inceptionYear>
146+
<maven.compiler.source>1.8</maven.compiler.source>
147+
<maven.compiler.target>1.8</maven.compiler.target>
147148
<!-- Ensure copies work OK (can be removed later when this is in parent POM) -->
148149
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
149150
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
150151
<commons.encoding>UTF-8</commons.encoding>
151152

152-
<checkstyle.version>2.17</checkstyle.version>
153+
<checkstyle.version>3.0.0</checkstyle.version>
153154
<checkstyle.header.file>${basedir}/LICENSE-header.txt</checkstyle.header.file>
154155
<checkstyle.resourceExcludes>LICENSE.txt, NOTICE.txt</checkstyle.resourceExcludes>
156+
157+
<!-- Fix for COMMONSSITE-124 remove once commons-parent 48 has been released -->
158+
<commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/${project.artifactId}</commons.scmPubUrl>
159+
<!-- Fix for COMMONSSITE-125 remove once commons-parent 48 has been released -->
160+
<commons.osgi.symbolicName>org.apache.commons.${commons.componentid}</commons.osgi.symbolicName>
155161
</properties>
156162

157163
<build>
@@ -214,7 +220,6 @@ CSV files of various types.
214220
<plugin>
215221
<groupId>org.apache.rat</groupId>
216222
<artifactId>apache-rat-plugin</artifactId>
217-
<version>${commons.rat.version}</version>
218223
<!-- Should agree with config in reporting section -->
219224
<configuration>
220225
<excludes>
@@ -237,6 +242,7 @@ CSV files of various types.
237242
</excludes>
238243
</configuration>
239244
</plugin>
245+
240246
</plugins>
241247
</build>
242248

@@ -263,7 +269,7 @@ CSV files of various types.
263269
<plugin>
264270
<groupId>org.apache.maven.plugins</groupId>
265271
<artifactId>maven-pmd-plugin</artifactId>
266-
<version>3.8</version>
272+
<version>3.11.0</version>
267273
<configuration>
268274
<targetJdk>${maven.compiler.target}</targetJdk>
269275
</configuration>

src/changes/changes.xml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,27 @@
3838
<title>Release Notes</title>
3939
</properties>
4040
<body>
41-
<release version="1.6" date="2018-MM-DD" description="Feature and bug fix release">
41+
<release version="1.7" date="2019-MM-DD" description="Feature and bug fix release (Java 8)">
42+
<action issue="CSV-233" type="add" dev="ggregory" due-to="Gary Gregory">Add predefined CSVFormats for printing MongoDB CSV anJ TSV.</action>
43+
<action issue="CSV-208" type="fix" dev="ggregory" due-to="Jurrie Overgoor">Fix escape character for POSTGRESQL_TEXT and POSTGRESQL_CSV formats.</action>
44+
<action issue="CSV-232" type="fix" dev="ggregory" due-to="Jurrie Overgoor, Gary Gregory">Site link "Source Repository" does not work.</action>
45+
<action issue="CSV-234" type="add" dev="ggregory" due-to="Roberto Benedetti, Gary Gregory">Add support for java.sql.Clob.</action>
46+
<action issue="CSV-237" type="update" dev="ggregory" due-to="Gary Gregory">Update to Java 8.</action>
47+
<action issue="CSV-238" type="fix" dev="ggregory" due-to="Stephen Olander-Waters">Escape quotes in CLOBs #39.</action>
48+
</release>
49+
<release version="1.6" date="2018-09-22" description="Feature and bug fix release (Java 7)">
50+
<action issue="CSV-231" type="update" dev="britter">Add more documentation to CSVPrinter.</action>
4251
<action issue="CSV-217" type="add" dev="ggregory" due-to="Korolyov Alexei">Add autoFlush option for CsvPrinter. PR #24.</action>
4352
<action issue="CSV-219" type="fix" dev="ggregory" due-to="Zhang Hongda">The behavior of quote char using is not similar as Excel does when the first string contains CJK char(s).</action>
4453
<action issue="CSV-172" type="fix" dev="ggregory" due-to="Andrew Pennebaker">Don't quote cells just because they have UTF-8 encoded characters.</action>
4554
<action issue="CSV-220" type="add" dev="ggregory" due-to="Gary Gregory">Add API org.apache.commons.csv.CSVFormat.withSystemRecordSeparator().</action>
4655
<action issue="CSV-223" type="fix" dev="ggregory" due-to="Samuel Martin">Inconsistency between Javadoc of CSVFormat DEFAULT EXCEL.</action>
4756
<action issue="CSV-209" type="fix" dev="ggregory" due-to="Gary Gregory">Create CSVFormat.ORACLE preset.</action>
48-
<action issue="CSV-224" type="fix" dev="ggregory" due-to="David Warshaw">Some Multi Iterator Parsing Peek Sequences Incorrectly Consume Elements.</action>
57+
<action issue="CSV-224" type="fix" dev="ggregory" due-to="David Warshaw">Some multi-iterator parsing peek sequences incorrectly consume elements.</action>
58+
<action issue="CSV-225" type="fix" dev="ggregory" due-to="Anson Schwabecher">Parse method should avoid creating a redundant BufferedReader.</action>
59+
<action issue="CSV-233" type="fix" dev="ggregory" due-to="Gary Gregory">Add predefined CSVFormats for printing MongoDB CSV and TSV.</action>
4960
</release>
50-
<release version="1.5" date="2017-09-03" description="Feature and bug fix release">
61+
<release version="1.5" date="2017-09-03" description="Feature and bug fix release (Java 7)">
5162
<action issue="CSV-203" type="fix" dev="ggregory" due-to="Richard Wheeldon, Kai Paroth">withNullString value is printed without quotes when QuoteMode.ALL is specified; add QuoteMode.ALL_NON_NULL. PR #17.</action>
5263
<action issue="CSV-194" type="fix" dev="ggregory" due-to="Marc Prud'hommeaux">Fix outdated comments about FileReader in CSVParser #13</action>
5364
<action issue="CSV-193" type="fix" dev="ggregory" due-to="Matthias Wiehl">Fix incorrect method name 'withFirstRowAsHeader' in user guide.</action>
@@ -62,12 +73,12 @@
6273
<action issue="CSV-207" type="add" dev="ggregory" due-to="Gary Gregory">Provide a CSV Format for printing PostgreSQL CSV and Text formats.</action>
6374
<action issue="CSV-214" type="add" dev="ggregory" due-to="Nitin Mahendru, Gary Gregory">Adding a placeholder in the Lexer and CSV parser to store the end-of-line string.</action>
6475
</release>
65-
<release version="1.4" date="2016-05-28" description="Feature and bug fix release">
76+
<release version="1.4" date="2016-05-28" description="Feature and bug fix release (Java 6)">
6677
<action issue="CSV-181" type="update" dev="ggregory" due-to="Gary Gregory">Make CSVPrinter.print(Object) GC-free.</action>
6778
<action issue="CSV-182" type="add" dev="ggregory" due-to="Gary Gregory">Allow some printing operations directly from CSVFormat.</action>
6879
<action issue="CSV-183" type="update" dev="ggregory">Drop ferc.gov tests.</action>
6980
</release>
70-
<release version="1.3" date="2016-05-09" description="Feature and bug fix release">
81+
<release version="1.3" date="2016-05-09" description="Feature and bug fix release (Java 6)">
7182
<action issue="CSV-179" type="add" dev="britter">Add shortcut method for using first record as header to CSVFormat</action>
7283
<action issue="CSV-180" type="add" dev="britter">Add withHeader(Class&lt;? extends Enum&gt;) to CSVFormat</action>
7384
<action issue="CSV-167" type="update" dev="sebb" due-to="Rene">Comment line hides next record; update Javadoc to make behaviour clear</action>
@@ -81,12 +92,12 @@
8192
<action issue="CSV-177" type="add" dev="ggregory" due-to="Gary Gregory">Support trimming leading and trailing blanks.</action>
8293
<action issue="CSV-178" type="add" dev="ggregory" due-to="Gary Gregory">Create default formats for Informix UNLOAD and UNLOAD CSV.</action>
8394
</release>
84-
<release version="1.2" date="2015-08-24" description="Feature and bug fix release">
95+
<release version="1.2" date="2015-08-24" description="Feature and bug fix release (Java 6)">
8596
<action issue="CSV-145" type="fix" dev="ggregory" due-to="Frank Ulbricht">CSVFormat.with* methods clear the header comments</action>
8697
<action issue="CSV-156" type="fix" dev="ggregory" due-to="Jason Steenstra-Pickens">Incorrect Javadoc on QuoteMode.NONE</action>
8798
<action issue="CSV-157" type="add" dev="ggregory">Add enum CSVFormat.Predefined that contains the default CSVFormat values.</action>
8899
</release>
89-
<release version="1.1" date="2014-11-16" description="Feature and bug fix release">
100+
<release version="1.1" date="2014-11-16" description="Feature and bug fix release (Java 6)">
90101
<action issue="CSV-140" type="fix" dev="ggregory" due-to="Damjan Jovanovic">QuoteMode.NON_NUMERIC doesn't work with CSVPrinter.printRecords(ResultSet)</action>
91102
<action issue="CSV-130" type="fix" dev="ggregory" due-to="Sergei Lebedev">CSVFormat#withHeader doesn't work well with #printComment, add withHeaderComments(String...)</action>
92103
<action issue="CSV-128" type="fix" dev="ggregory">CSVFormat.EXCEL should ignore empty header names</action>
@@ -97,7 +108,7 @@
97108
<action issue="CSV-131" type="add" dev="ggregory" due-to="Holger Stratmann">Save positions of records to enable random access</action>
98109
<action issue="CSV-139" type="add" dev="ggregory">CSVPrinter.printRecord(ResultSet) with metadata</action>
99110
</release>
100-
<release version="1.0" date="2014-08-14" description="First release">
111+
<release version="1.0" date="2014-08-14" description="First release (Java 6)">
101112
<action issue="CSV-125" type="fix" dev="britter">No longer works with Java 6</action>
102113
<action issue="CSV-122" type="fix" dev="britter" due-to="Mike Lewis">NullPointerException when empty header string and and null string of ""</action>
103114
<action issue="CSV-117" type="update" dev="sebb">Validate format parameters in constructor</action>

src/main/java/org/apache/commons/csv/Assertions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private Assertions() {
3030
// can not be instantiated
3131
}
3232

33-
public static void notNull(final Object parameter, final String parameterName) {
33+
static void notNull(final Object parameter, final String parameterName) {
3434
if (parameter == null) {
3535
throw new IllegalArgumentException("Parameter '" + parameterName + "' must not be null!");
3636
}

0 commit comments

Comments
 (0)