davsclaus commented on code in PR #21249:
URL: https://github.com/apache/camel/pull/21249#discussion_r2769146990
##########
components/camel-zipfile/src/main/java/org/apache/camel/dataformat/zipfile/ZipIterator.java:
##########
@@ -143,10 +148,9 @@ private Message getNextElement() {
return getNextElement(); // skip directory
}
} else {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- IOHelper.copy(zipInputStream, baos);
- byte[] data = baos.toByteArray();
- answer.setBody(new ByteArrayInputStream(data));
+ CachedOutputStream cos = new CachedOutputStream(exchange);
Review Comment:
Yeah that is fine its also the zip iterator that creates the COS so its fine
that it also closes it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]