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 7dd802cd4a6a9ef77e8138359f7305652d729d4b Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Jun 7 17:49:29 2023 +0100 Prep before applying formatter. --- java/org/apache/tomcat/util/buf/Asn1Parser.java | 2 +- java/org/apache/tomcat/util/buf/ByteChunk.java | 14 ++++++++------ java/org/apache/tomcat/util/buf/MessageBytes.java | 7 ++++--- java/org/apache/tomcat/util/buf/UDecoder.java | 3 +++ 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/java/org/apache/tomcat/util/buf/Asn1Parser.java b/java/org/apache/tomcat/util/buf/Asn1Parser.java index 436e5ea5f0..9c5bb276b2 100644 --- a/java/org/apache/tomcat/util/buf/Asn1Parser.java +++ b/java/org/apache/tomcat/util/buf/Asn1Parser.java @@ -23,7 +23,7 @@ import org.apache.tomcat.util.res.StringManager; /** * This is a very basic ASN.1 parser that provides the limited functionality * required by Tomcat. It is a long way from a complete parser. - * + * <p> * TODO: Consider extending this parser and refactoring the SpnegoTokenFixer to * use it. */ diff --git a/java/org/apache/tomcat/util/buf/ByteChunk.java b/java/org/apache/tomcat/util/buf/ByteChunk.java index b8e060e81b..40607bb084 100644 --- a/java/org/apache/tomcat/util/buf/ByteChunk.java +++ b/java/org/apache/tomcat/util/buf/ByteChunk.java @@ -44,17 +44,17 @@ import java.nio.charset.StandardCharsets; /** * This class is used to represent a chunk of bytes, and utilities to manipulate * byte[]. - * + * <p> * The buffer can be modified and used for both input and output. - * + * <p> * There are 2 modes: The chunk can be associated with a sink - ByteInputChannel * or ByteOutputChannel, which will be used when the buffer is empty (on input) * or filled (on output). For output, it can also grow. This operating mode is * selected by calling setLimit() or allocate(initial, limit) with limit != -1. - * + * <p> * Various search and append method are defined - similar with String and * StringBuffer, but operating on bytes. - * + * <p> * This is important because it allows processing the http headers directly on * the received bytes, without converting to chars and Strings until the strings * are needed. In addition, the charset is determined later, from headers or @@ -728,7 +728,8 @@ public final class ByteChunk extends AbstractChunk { /** * Returns the first instance of the given character in this ByteChunk * starting at the specified byte. If the character is not found, -1 is - * returned. <br> + * returned. + * <p> * NOTE: This only works for characters in the range 0-127. * * @param c The character @@ -744,7 +745,8 @@ public final class ByteChunk extends AbstractChunk { /** * Returns the first instance of the given character in the given byte array - * between the specified start and end. <br> + * between the specified start and end. + * <p> * NOTE: This only works for characters in the range 0-127. * * @param bytes The array to search diff --git a/java/org/apache/tomcat/util/buf/MessageBytes.java b/java/org/apache/tomcat/util/buf/MessageBytes.java index d013231470..78f1f114d0 100644 --- a/java/org/apache/tomcat/util/buf/MessageBytes.java +++ b/java/org/apache/tomcat/util/buf/MessageBytes.java @@ -30,7 +30,7 @@ import java.util.Locale; * This class is used to represent a subarray of bytes in an HTTP message. * It represents all request/response elements. The byte/char conversions are * delayed and cached. Everything is recyclable. - * + * <p> * The object can represent a byte[], a char[], or a (sub) String. All * operations can be made in case sensitive mode or not. * @@ -278,7 +278,7 @@ public final class MessageBytes implements Cloneable, Serializable { /** * Convert to char[] and fill the CharChunk. - * + * <p> * Note: The conversion from bytes is not optimised - it converts to String * first. However, Tomcat doesn't call this method to convert from * bytes so there is no benefit from optimising that path. @@ -305,7 +305,8 @@ public final class MessageBytes implements Cloneable, Serializable { /** * Returns the length of the original buffer. - * Note that the length in bytes may be different from the length + * <p> + * Note: The length in bytes may be different from the length * in chars. * @return the length */ diff --git a/java/org/apache/tomcat/util/buf/UDecoder.java b/java/org/apache/tomcat/util/buf/UDecoder.java index 094d50ef9a..b411244071 100644 --- a/java/org/apache/tomcat/util/buf/UDecoder.java +++ b/java/org/apache/tomcat/util/buf/UDecoder.java @@ -190,11 +190,14 @@ public final class UDecoder { * Decoding is required. * * Potential complications: + * * - The source String may be partially decoded so it is not valid to * assume that the source String is ASCII. + * * - Have to process as characters since there is no guarantee that the * byte sequence for '%' is going to be the same in all character * sets. + * * - We don't know how many '%nn' sequences are required for a single * character. It varies between character sets and some use a variable * length. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org