mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
97e96895db
Prior to this commit, the `MediaType` and `MimeType` "copy" constructors would not leverage the fact that the existing instance has been validated already (types, subtype and parameters have been checked already for errors) and the entire validation would be performed again. This would also allocate map instances in the process. This commit ensures that the already validated information is reused directly and that we avoid unnessecary operations and allocations for such constructors. Closes gh-36318