diff options
author | Ram Koya <rk541m@att.com> | 2018-09-07 15:22:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-09-07 15:22:23 +0000 |
commit | b1a2963af584d1baed00695d2d8147338141fc53 (patch) | |
tree | 284a026f3f58c19091995d7edea841c6d393de67 /src/main/java/com/att | |
parent | 7e47dcf3f89e77d993620e50d0364772decfb211 (diff) | |
parent | 43cd454e7eb4e061cf79d84a9eda1b393a59edca (diff) |
Merge "Fixed blocker issue in DMaaPResponseBuilder.java"
Diffstat (limited to 'src/main/java/com/att')
-rw-r--r-- | src/main/java/com/att/dmf/mr/utils/DMaaPResponseBuilder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/att/dmf/mr/utils/DMaaPResponseBuilder.java b/src/main/java/com/att/dmf/mr/utils/DMaaPResponseBuilder.java index 4c38d57..c9a998b 100644 --- a/src/main/java/com/att/dmf/mr/utils/DMaaPResponseBuilder.java +++ b/src/main/java/com/att/dmf/mr/utils/DMaaPResponseBuilder.java @@ -130,10 +130,10 @@ public class DMaaPResponseBuilder { */ public static void respondOkWithStream(DMaaPContext ctx, String mediaType, StreamWriter writer) throws IOException { ctx.getResponse().setStatus(200); - OutputStream os = getStreamForBinaryResponse(ctx, mediaType); - writer.write(os); - os.close(); - + try(OutputStream os = getStreamForBinaryResponse(ctx, mediaType)) { + writer.write(os); + } + } |