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
The following commit(s) were added to refs/heads/main by this push: new 897931b68c Fix BZ 66627 - restore documented behaviour of MessageBytes.getType() 897931b68c is described below commit 897931b68c89788eeb71398c8e6dfda1d5bae161 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 0aacbd83d6..e47d91fc95 100644 --- a/java/org/apache/tomcat/util/buf/MessageBytes.java +++ b/java/org/apache/tomcat/util/buf/MessageBytes.java @@ -169,11 +169,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; } @@ -294,7 +291,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 d588713061..ac699016b3 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