summaryrefslogtreecommitdiff
path: root/BKUOnline/src/main/java
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2014-03-03 16:28:36 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2014-03-03 16:28:36 +0000
commit23f49aa90131e967da6413d91a4353e43ca5c7d9 (patch)
treea12acd1e00aafc502d53870274384da73268db6e /BKUOnline/src/main/java
parent36286caab464c0124c85188781fc61ff20345e33 (diff)
downloadmocca-23f49aa90131e967da6413d91a4353e43ca5c7d9.tar.gz
mocca-23f49aa90131e967da6413d91a4353e43ca5c7d9.tar.bz2
mocca-23f49aa90131e967da6413d91a4353e43ca5c7d9.zip
Get rid of unclosed stream warning
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1300 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline/src/main/java')
-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);
}
}