This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new f5cea7a64b Update package renamed fork of Commons Codec f5cea7a64b is described below commit f5cea7a64bb59678d5a9af8de39fbed9a1d1e9d5 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Jan 3 12:41:45 2023 +0000 Update package renamed fork of Commons Codec --- MERGE.txt | 2 +- java/org/apache/tomcat/util/codec/binary/BaseNCodec.java | 5 +++-- webapps/docs/changelog.xml | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/MERGE.txt b/MERGE.txt index 17a52c0dc3..a44ce46536 100644 --- a/MERGE.txt +++ b/MERGE.txt @@ -43,7 +43,7 @@ Codec 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 3ff6864e54..51e3792e0e 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.codec.BinaryDecoder; import org.apache.tomcat.util.codec.BinaryEncoder; @@ -253,8 +255,7 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder { 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 a2ad52ca2f..5f0b47862c 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -169,10 +169,6 @@ deprecated in Java 20 onwards, the reasons for deprecation are valid for all versions so move away from them now. (markt) </scode> - <update> - Update the internal fork of Apache Commons Codec to ae32a3f (2022-11-29, - 1.16-SNAPSHOT). (markt) - </update> <update> Update to Commons Daemon 1.3.3. (markt) </update> @@ -188,6 +184,10 @@ 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> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org