You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/01/03 12:53:33 UTC

[tomcat] 03/03: Update package renamed fork of Commons Codec

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit e529969d152c9ffa17226ee3cd1225b471cb0d59
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jan 3 12:41:45 2023 +0000

    Update package renamed fork of Commons Codec
---
 MERGE.txt                                                | 4 ++--
 java/org/apache/tomcat/util/codec/binary/BaseNCodec.java | 5 +++--
 webapps/docs/changelog.xml                               | 6 +++++-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/MERGE.txt b/MERGE.txt
index de8e38d901..5673ec8d95 100644
--- a/MERGE.txt
+++ b/MERGE.txt
@@ -37,7 +37,7 @@ Unused code is removed
 Sub-tree:
 src/main/java/org/apache/bcel
 The SHA1 ID / tag for the most recent commit to be merged to Tomcat is:
-2ee2bff580c7138545377628074173412c27290c (2023-01-02)
+2ee2bff580c7138545377628074173412c27290c (2023-01-03)
 
 Codec
 -----
@@ -45,7 +45,7 @@ Unused code is removed
 Sub-tree:
 src/main/java/org/apache/commons/codec
 The SHA1 ID / tag for the most recent commit to be merged to Tomcat is:
-ae32a3f2fa6b722b8ad67bd125a52edb78932314 (2022-11-29)
+f03cbd3ba741758ead9f59bc07e6688a739a4813 (2023-01-03)
 Note: Only classes required for Base64 encoding/decoding. The rest are removed.
 
 FileUpload
diff --git a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
index 09e647ff97..0bfcf7312a 100644
--- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
+++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
@@ -16,6 +16,8 @@
  */
 package org.apache.tomcat.util.codec.binary;
 
+import java.util.Arrays;
+
 import org.apache.tomcat.util.buf.HexUtils;
 import org.apache.tomcat.util.res.StringManager;
 
@@ -206,8 +208,7 @@ public abstract class BaseNCodec {
             newCapacity = createPositiveCapacity(minCapacity);
         }
 
-        final byte[] b = new byte[newCapacity];
-        System.arraycopy(context.buffer, 0, b, 0, context.buffer.length);
+        final byte[] b = Arrays.copyOf(context.buffer, newCapacity);
         context.buffer = b;
         return b;
     }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index bed020552d..b80ff1a41d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -164,9 +164,13 @@
         Jakarta EE to 1.0.6. (markt)
       </update>
       <update>
-        Update the internal fork of Apache Commons BCEL to 2ee2bff (2023-01-02,
+        Update the internal fork of Apache Commons BCEL to 2ee2bff (2023-01-03,
         6.7.1-SNAPSHOT). (markt)
       </update>
+      <update>
+        Update the internal fork of Apache Commons Codec to 3eafd6c (2023-01-03,
+        1.16-SNAPSHOT). (markt)
+      </update>
       <update>
         Update the internal fork of Apache Commons FileUpload to 34eb241
         (2023-01-03, 2.0-SNAPSHOT). (markt)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org