You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/08/11 00:32:22 UTC

svn commit: r1156392 - /activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java

Author: tabish
Date: Wed Aug 10 22:32:22 2011
New Revision: 1156392

URL: http://svn.apache.org/viewvc?rev=1156392&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQ-2430

Modified:
    activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java

Modified: activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java?rev=1156392&r1=1156391&r2=1156392&view=diff
==============================================================================
--- activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java (original)
+++ activemq/trunk/activemq-fileserver/src/main/java/org/apache/activemq/util/RestFilter.java Wed Aug 10 22:32:22 2011
@@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory;
  * read-permission-role and write-permission-role are defined then all requests
  * are authorized using the defined roles. Also GET methods are authorized.
  * </p>
- * 
+ *
  * @author Aleksi Kallio
  */
 public class RestFilter implements Filter {
@@ -179,8 +179,9 @@ public class RestFilter implements Filte
             IOHelper.copyInputStream(request.getInputStream(), out);
         } catch (IOException e) {
             LOG.warn("Exception occured" , e);
-            out.close();
             throw e;
+        } finally {
+            out.close();
         }
 
         response.setStatus(HttpURLConnection.HTTP_NO_CONTENT); // we return no