This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new 22ee9573b7 Fix BZ 66627 - restore documented behaviour of MessageBytes.getType() 22ee9573b7 is described below commit 22ee9573b7ace5a20892a42016fbb51c12eb65ff Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Jun 8 13:58:09 2023 +0100 Fix BZ 66627 - restore documented behaviour of MessageBytes.getType() --- java/org/apache/tomcat/util/buf/MessageBytes.java | 4 ---- webapps/docs/changelog.xml | 10 ++++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/java/org/apache/tomcat/util/buf/MessageBytes.java b/java/org/apache/tomcat/util/buf/MessageBytes.java index 083125da31..83289a8b45 100644 --- a/java/org/apache/tomcat/util/buf/MessageBytes.java +++ b/java/org/apache/tomcat/util/buf/MessageBytes.java @@ -170,11 +170,9 @@ public final class MessageBytes implements Cloneable, Serializable { // No conversion required break; case T_BYTES: - type = T_STR; strValue = byteC.toString(); break; case T_CHARS: - type = T_STR; strValue = charC.toString(); break; } @@ -272,7 +270,6 @@ public final class MessageBytes implements Cloneable, Serializable { } byteC.setBytes(bb.array(), bb.arrayOffset(), bb.limit()); - type = T_BYTES; } @@ -316,7 +313,6 @@ public final class MessageBytes implements Cloneable, Serializable { toString(); //$FALL-THROUGH$ case T_STR: { - type = T_CHARS; char cc[] = strValue.toCharArray(); charC.setChars(cc, 0, cc.length); } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index d60a4115e5..d013c64e19 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -114,6 +114,16 @@ </fix> </changelog> </subsection> + <subsection name="Coyote"> + <changelog> + <fix> + <bug>66627</bug>: Restore the documented behaviour of + <code>MessageBytes.getType()</code> that it returns the type of the + original content rather than reflecting the most recent conversion. + (markt) + </fix> + </changelog> + </subsection> <subsection name="WebSocket"> <changelog> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org