This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push: new d93e41f Update codec - no substantive change d93e41f is described below commit d93e41f4eb8876069bf7126fbdf1232a33969e29 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Jan 15 12:27:10 2021 +0000 Update codec - no substantive change --- java/org/apache/tomcat/util/codec/binary/Base64.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/org/apache/tomcat/util/codec/binary/Base64.java b/java/org/apache/tomcat/util/codec/binary/Base64.java index 581d7ea..3c76ca2 100644 --- a/java/org/apache/tomcat/util/codec/binary/Base64.java +++ b/java/org/apache/tomcat/util/codec/binary/Base64.java @@ -375,8 +375,8 @@ public class Base64 extends BaseNCodec { * @since 1.5 */ public static boolean isBase64(final byte[] arrayOctet) { - for (byte b : arrayOctet) { - if (!isBase64(b) && !isWhiteSpace(b)) { + for (byte element : arrayOctet) { + if (!isBase64(element) && !isWhiteSpace(element)) { return false; } } @@ -443,7 +443,8 @@ public class Base64 extends BaseNCodec { private static void validateCharacter(final int emptyBitsMask, final Context context) { if ((context.ibitWorkArea & emptyBitsMask) != 0) { throw new IllegalArgumentException( - "Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value. " + + "Last encoded character (before the paddings if any) is a valid " + + "base 64 alphabet but not a possible value. " + "Expected the discarded bits to be zero."); } } @@ -601,8 +602,7 @@ public class Base64 extends BaseNCodec { } if (lineLength > 0){ // null line-sep forces no chunking rather than throwing IAE this.encodeSize = BYTES_PER_ENCODED_BLOCK + lineSeparator.length; - this.lineSeparator = new byte[lineSeparator.length]; - System.arraycopy(lineSeparator, 0, this.lineSeparator, 0, lineSeparator.length); + this.lineSeparator = lineSeparator.clone(); } else { this.encodeSize = BYTES_PER_ENCODED_BLOCK; this.lineSeparator = null; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org