Skip to content

Commit

Permalink
Simplified.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Sep 26, 2023
1 parent e4975dd commit 38ba928
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public void aroundWriteTo(WriterInterceptorContext context) throws IOException,
if (CONTENT_TYPE.get() != null) {
try {
context.getHeaders().put(HttpHeaders.CONTENT_TYPE, Collections.singletonList(CONTENT_TYPE.get()));
if (context.getEntity() instanceof InputStream) {
IOUtils.copy((InputStream) context.getEntity(), context.getOutputStream());
if (context.getEntity() instanceof InputStream inputStream) {
IOUtils.copy(inputStream, context.getOutputStream());
} else {
context.proceed();
}
Expand Down

0 comments on commit 38ba928

Please sign in to comment.