summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java
index 67253f24..37cc213d 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java
@@ -115,8 +115,8 @@ public class ResultServlet extends HttpServlet {
HTTPBindingProcessor bp = (HTTPBindingProcessor) bindingProcessor;
+ OutputStream outputStream = null;
try {
- OutputStream outputStream;
String redirectUrl = bp.getRedirectURL();
if (redirectUrl != null && !redirectUrl.trim().isEmpty()) {
log.info("Sending (deferred) redirect to {}.", redirectUrl);
@@ -141,8 +141,9 @@ public class ResultServlet extends HttpServlet {
outputStream = resp.getOutputStream();
}
bp.writeResultTo(outputStream, responseEncoding);
- outputStream.close();
} finally {
+ if (outputStream != null)
+ outputStream.close();
bindingProcessorManager.removeBindingProcessor(id);
}
}