Skip to content

MarshallingView should avoid temporary byte array when copying to response [SPR-11646] #16269

Closed
@spring-projects-issues

Description

@spring-projects-issues

Juergen Hoeller opened SPR-11646 and commented

MarshallingView's current code:

StreamUtils.copy(baos.toByteArray(), response.getOutputStream());

can be optimized to:

baos.writeTo(response.getOutputStream());

in order to avoid the temporary copy in a byte array.


Affects: 3.2.8, 4.0.3

Issue Links:

Backported to: 3.2.9

Metadata

Metadata

Assignees

Labels

status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions