You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by tv...@apache.org on 2026/01/08 18:51:56 UTC
(turbine-core) 03/05: Use Base64 from JDK, removing commons-codec dependency
This is an automated email from the ASF dual-hosted git repository.
tv pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/turbine-core.git
commit db39340d83cc1d3c8c7fa415a273dd33a313f0b4
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Thu Jan 8 19:49:57 2026 +0100
Use Base64 from JDK, removing commons-codec dependency
---
.../org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/java/org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java b/src/java/org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java
index 4f4aa606..626616f3 100644
--- a/src/java/org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java
+++ b/src/java/org/apache/turbine/services/uniqueid/TurbineUniqueIdService.java
@@ -24,9 +24,9 @@ import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
+import java.util.Base64;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.commons.codec.binary.Base64;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.turbine.Turbine;
@@ -78,8 +78,7 @@ public class TurbineUniqueIdService
MessageDigest md = MessageDigest.getInstance("MD5");
byte [] bytesId = md.digest(turbineURL.getBytes(StandardCharsets.UTF_8));
- turbineId = new String(Base64.encodeBase64(bytesId),
- StandardCharsets.UTF_8);
+ turbineId = Base64.getEncoder().encodeToString(bytesId);
log.info("This is Turbine instance running at: {}", turbineURL);
log.info("The instance id is #{}", turbineId);