This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit fc09aea5860db67a486c9287c3e43ac87534556d 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 01e38db7ae..210a49fdbb 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 @@ -775,7 +775,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 @@ -791,7 +792,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 f1b37ae9ae..94a8180084 100644 --- a/java/org/apache/tomcat/util/buf/MessageBytes.java +++ b/java/org/apache/tomcat/util/buf/MessageBytes.java @@ -29,7 +29,7 @@ import org.apache.tomcat.util.res.StringManager; * 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. * @@ -301,7 +301,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. @@ -328,7 +328,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 431ea44a6f..6345281918 100644 --- a/java/org/apache/tomcat/util/buf/UDecoder.java +++ b/java/org/apache/tomcat/util/buf/UDecoder.java @@ -393,11 +393,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