This is an automated email from the ASF dual-hosted git repository.
ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git
The following commit(s) were added to refs/heads/master by this push:
new 2fc8603e Replace commons-codec with java.util.Base64
2fc8603e is described below
commit 2fc8603e8461b5e4ccd3f285d3780f5f4935ea20
Author: Emmanuel Bourg <[email protected]>
AuthorDate: Wed Oct 21 10:32:51 2026 +0200
Replace commons-codec with java.util.Base64
---
pom.xml | 7 -------
src/changes/changes.xml | 2 +-
src/main/java/org/apache/commons/csv/CSVFormat.java | 4 ++--
3 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/pom.xml b/pom.xml
index 82ec8f75..7edd2ab1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,11 +44,6 @@
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>${commons.codec.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
@@ -108,11 +103,9 @@
<japicmp.skip>false</japicmp.skip>
<commons.release.isDistModule>true</commons.release.isDistModule>
<project.build.outputTimestamp>2025-07-30T14:51:35Z</project.build.outputTimestamp>
- <commons.codec.version>1.23.0</commons.codec.version>
<commons.io.version>2.22.0</commons.io.version>
<!-- Apache Felix maven-bundle-plugin -->
<commons.osgi.import>
- org.apache.commons.codec.binary;version="${commons.codec.version}",
org.apache.commons.io;version="${commons.io.version}",
org.apache.commons.io.build;version="${commons.io.version}",
org.apache.commons.io.function;version="${commons.io.version}",
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d9b3963b..235f8760 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -83,10 +83,10 @@
<action type="add" dev="ggregory" due-to="Gary Gregory, Indy, Sylvia van
Os" issue="CSV-307">Add an "Android Compatibility" section to the web
site.</action>
<action type="add" dev="ggregory" due-to="Ruiqi Dong, Gary Gregory"
issue="CSV-325">Add CSVParser.Builder.setByteOffset(long) (#604).</action>
<!-- UPDATE -->
+ <action type="update" dev="ggregory" due-to="Emmanuel Bourg">Replace
commons-codec with java.util.Base64.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory,
Dependabot">Bump org.apache.commons:commons-parent from 85 to 106 #573,
#595.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory,
Dependabot">[test] Bump com.opencsv:opencsv from 5.11.2 to 5.12.0 #558.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump
org.apache.commons:commons-lang3 from 3.18.0 to 3.21.0.</action>
- <action type="update" dev="ggregory" due-to="Gary Gregory">Bump
commons-codec:commons-codec from 1.19.0 to 1.23.0.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump
commons-io:commons-io from 2.20.0 to 2.22.0 #594.</action>
</release>
<release version="1.14.1" date="2025-07-27" description="This is a feature
and maintenance release. Java 8 or later is required.">
diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java
b/src/main/java/org/apache/commons/csv/CSVFormat.java
index 63698174..c4172d97 100644
--- a/src/main/java/org/apache/commons/csv/CSVFormat.java
+++ b/src/main/java/org/apache/commons/csv/CSVFormat.java
@@ -39,12 +39,12 @@ import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.Arrays;
+import java.util.Base64;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
-import org.apache.commons.codec.binary.Base64OutputStream;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.function.IOStream;
import org.apache.commons.io.function.Uncheck;
@@ -2252,7 +2252,7 @@ public final class CSVFormat implements Serializable {
}
// Stream the input to the output without reading or holding the whole
value in memory.
// AppendableOutputStream cannot "close" an Appendable.
- try (OutputStream outputStream = new Base64OutputStream(new
AppendableOutputStream<>(out))) {
+ try (OutputStream outputStream = Base64.getEncoder().wrap(new
AppendableOutputStream<>(out))) {
IOUtils.copy(inputStream, outputStream);
}
if (quoteCharacterSet) {