Skip to content

Commit 8db60a9

Browse files
committed
Bump commons-parent from 52 to 53.
Allow org.apache.commons.csv.IOUtils.copy(Reader, Appendable, CharBuffer) to compile on Java 11 and run on Java 8.
1 parent dd75e11 commit 8db60a9

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>org.apache.commons</groupId>
2222
<artifactId>commons-parent</artifactId>
23-
<version>52</version>
23+
<version>53</version>
2424
</parent>
2525
<artifactId>commons-csv</artifactId>
2626
<version>1.10.0-SNAPSHOT</version>

src/changes/changes.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
<action issue="CSV-292" type="fix" dev="kinow" due-to="Rob Vesse">No Automatic-Module-Name prevents usage in JPMS projects without repacking the JAR.</action>
4545
<action issue="CSV-288" type="fix" dev="ggregory" due-to="Santhsoh, Angus">Fix for multi-char delimiter not working as expected #218.</action>
4646
<action issue="CSV-269" type="fix" dev="ggregory" due-to="Auke te Winkel, Gary Gregory">CSVRecord.get(Enum) should use Enum.name() instead of Enum.toString().</action>
47+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Allow org.apache.commons.csv.IOUtils.copy(Reader, Appendable, CharBuffer) to compile on Java 11 and run on Java 8.</action>
48+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Bump commons-parent from 52 to 53.</action>
4749
<!-- ADD -->
4850
<action issue="CSV-291" type="add" dev="ggregory" due-to="Gary Gregory">Make CSVRecord#values() public.</action>
4951
<action issue="CSV-264" type="add" dev="ggregory" due-to="Sagar Tiwari, Seth Falco, Alex Herbert, Gary Gregory">Add DuplicateHeaderMode for flexibility with header strictness. #114.</action>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.io.IOException;
2020
import java.io.Reader;
2121
import java.io.Writer;
22+
import java.nio.Buffer;
2223
import java.nio.CharBuffer;
2324

2425
/** Copied from Apache Commons IO. */
@@ -79,7 +80,7 @@ static long copy(final Reader input, final Appendable output, final CharBuffer b
7980
long count = 0;
8081
int n;
8182
while (EOF != (n = input.read(buffer))) {
82-
buffer.flip();
83+
((Buffer) buffer).flip();
8384
output.append(buffer, 0, n);
8485
count += n;
8586
}

0 commit comments

Comments
 (0)