CSV-125: No longer works with Java 6. Changing source level back to Java 6
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1611389 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aff3891701
commit
7d8821225e
7
pom.xml
7
pom.xml
|
@ -49,7 +49,8 @@ CSV files of various types.
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
<version>1.4.180</version>
|
<!-- 1.3.172 requires Java 1.6 -->
|
||||||
|
<version>1.3.168</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -119,8 +120,8 @@ CSV files of various types.
|
||||||
<commons.componentid>csv</commons.componentid>
|
<commons.componentid>csv</commons.componentid>
|
||||||
<commons.jira.id>CSV</commons.jira.id>
|
<commons.jira.id>CSV</commons.jira.id>
|
||||||
<commons.jira.pid>12313222</commons.jira.pid>
|
<commons.jira.pid>12313222</commons.jira.pid>
|
||||||
<maven.compiler.source>1.7</maven.compiler.source>
|
<maven.compiler.source>1.6</maven.compiler.source>
|
||||||
<maven.compiler.target>1.7</maven.compiler.target>
|
<maven.compiler.target>1.6</maven.compiler.target>
|
||||||
<!-- Ensure copies work OK (can be removed later when this is in parent POM) -->
|
<!-- Ensure copies work OK (can be removed later when this is in parent POM) -->
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
|
|
@ -39,7 +39,8 @@
|
||||||
</properties>
|
</properties>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<release version="1.0" date="TBD" description="First release">
|
<release version="1.0" date="TBD" description="First release">
|
||||||
|
<action issue="CSV-125" type="fix" dev="britter">No longer works with Java 6</action>
|
||||||
<action issue="CSV-122" type="fix" dev="britter" due-to="Mike Lewis">NullPointerException when empty header string and and null string of ""</action>
|
<action issue="CSV-122" type="fix" dev="britter" due-to="Mike Lewis">NullPointerException when empty header string and and null string of ""</action>
|
||||||
<action issue="CSV-117" type="update" dev="sebb">Validate format parameters in constructor</action>
|
<action issue="CSV-117" type="update" dev="sebb">Validate format parameters in constructor</action>
|
||||||
<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>
|
<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>
|
||||||
|
|
|
@ -41,7 +41,7 @@ limitations under the License.
|
||||||
and various <a href="project-reports.html">project reports</a> are provided.
|
and various <a href="project-reports.html">project reports</a> are provided.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
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.
|
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.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The <a href="source-repository.html">subversion repository</a> can be
|
The <a href="source-repository.html">subversion repository</a> can be
|
||||||
|
|
|
@ -39,14 +39,16 @@ for (CSVRecord record : records) {
|
||||||
class from <a href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> for example:
|
class from <a href="https://commons.apache.org/proper/commons-io/">Apache Commons IO</a> for example:
|
||||||
</p>
|
</p>
|
||||||
<source>final URL url = ...;
|
<source>final URL url = ...;
|
||||||
try (
|
final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), "UTF-8");
|
||||||
final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), StandardCharsets.UTF_8);
|
final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
|
||||||
final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
|
try {
|
||||||
) {
|
|
||||||
for (final CSVRecord record : parser) {
|
for (final CSVRecord record : parser) {
|
||||||
final String string = record.get("SomeColumn");
|
final String string = record.get("SomeColumn");
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
parser.close();
|
||||||
|
reader.close();
|
||||||
}</source>
|
}</source>
|
||||||
</section>
|
</section>
|
||||||
<!-- ================================================== -->
|
<!-- ================================================== -->
|
||||||
|
|
Loading…
Reference in New Issue