File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ CSV files of various types.
4949 <dependency >
5050 <groupId >com.h2database</groupId >
5151 <artifactId >h2</artifactId >
52- <version >1.4.180</version >
52+ <!-- 1.3.172 requires Java 1.6 -->
53+ <version >1.3.168</version >
5354 <scope >test</scope >
5455 </dependency >
5556 </dependencies >
@@ -119,8 +120,8 @@ CSV files of various types.
119120 <commons .componentid>csv</commons .componentid>
120121 <commons .jira.id>CSV</commons .jira.id>
121122 <commons .jira.pid>12313222</commons .jira.pid>
122- <maven .compiler.source>1.7 </maven .compiler.source>
123- <maven .compiler.target>1.7 </maven .compiler.target>
123+ <maven .compiler.source>1.6 </maven .compiler.source>
124+ <maven .compiler.target>1.6 </maven .compiler.target>
124125 <!-- Ensure copies work OK (can be removed later when this is in parent POM) -->
125126 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
126127 <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
Original file line number Diff line number Diff line change 3939 </properties >
4040 <body >
4141
42- <release version =" 1.0" date =" TBD" description =" First release" >
42+ <release version =" 1.0" date =" TBD" description =" First release" >
43+ <action issue =" CSV-125" type =" fix" dev =" britter" >No longer works with Java 6</action >
4344 <action issue =" CSV-122" type =" fix" dev =" britter" due-to =" Mike Lewis" >NullPointerException when empty header string and and null string of ""</action >
4445 <action issue =" CSV-117" type =" update" dev =" sebb" >Validate format parameters in constructor</action >
4546 <action issue =" CSV-121" type =" add" dev =" ggregory" due-to =" Sebastian Hardt" >IllegalArgumentException thrown when the header contains duplicate names when the column names are empty.</action >
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ limitations under the License.
4141 and various <a href =" project-reports.html" >project reports</a > are provided.
4242 </p >
4343 <p >
44- The JavaDoc API documents for the <a href =" javadocs/api-1.0/index.html" >current stable release 1.0</a > [Java 7 .0+] can be viewed in a web browser.
44+ The JavaDoc API documents for the <a href =" javadocs/api-1.0/index.html" >current stable release 1.0</a > [Java 6 .0+] can be viewed in a web browser.
4545 </p >
4646 <p >
4747 The <a href =" source-repository.html" >subversion repository</a > can be
Original file line number Diff line number Diff line change @@ -39,14 +39,16 @@ for (CSVRecord record : records) {
3939 class from <a href =" https://commons.apache.org/proper/commons-io/" >Apache Commons IO</a > for example:
4040 </p >
4141 <source >final URL url = ...;
42- try (
43- final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), StandardCharsets.UTF_8);
44- final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
45- ) {
42+ final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), "UTF-8");
43+ final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
44+ try {
4645 for (final CSVRecord record : parser) {
4746 final String string = record.get("SomeColumn");
4847 ...
4948 }
49+ } finally {
50+ parser.close();
51+ reader.close();
5052}</source >
5153</section >
5254<!-- ================================================== -->
You can’t perform that action at this time.
0 commit comments