https://bz.apache.org/bugzilla/show_bug.cgi?id=68026

            Bug ID: 68026
           Summary: org.apache.tomcat.buf.MessageBytes.toString() is no
                    longuer cached
           Product: Tomcat 10
           Version: 10.1.15
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet
          Assignee: dev@tomcat.apache.org
          Reporter: lucas.pou...@lpoconseil.fr
  Target Milestone: ------

Created attachment 39323
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=39323&action=edit
Java Flight Recording with spring boot application

Since fixing bug 66196, the org.apache.tomcat.buf.MessageBytes.toString() is no
longuer cached.

For one tomcat request, if a multiple calls (by example to this method,
org.apache.catalina.connector.RequestFacade.getMethod() by springframework) is
processed, a memory overconsumption is observed

Maybe just fix with this ? 


```
    public String toString() {
        switch (type) {
            case T_NULL:
            case T_STR:
                // No conversion required
                break;
            case T_BYTES:
                // strValue = byteC.toString(); #OLD
                setString(byteC.toString());
                break;
            case T_CHARS:
                // strValue = charC.toString(); #OLD
                setString(charC.toString());
                break;
        }

        return strValue;
    }
```

Same problem with tomcat 
-  >= 10.1.0
-  >= 9.0.71
-  >= 8.5.85

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to