mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:30:28 +00:00
The limit was previously enforced in XmlEventDecoder, because it is what parses incoming buffers. However, the actual caching is in Jaxb2Decoder, which holds on to XML events, but has no good way to estimate their size. After this commit XmlEventDecoder no longer enforces memory limits for async parsing. It releases each buffer immediately anyway. Instead XmlEventDecoder is only responsible to update the number of bytes received via a new ReceivedByteTracker type while Jaxb2XmlDecoder uses the same to perform limit and reset the count depending on when it is aggregating XML events. Closes gh-37031