You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jc...@apache.org on 2008/05/04 15:42:52 UTC

svn commit: r653208 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java

Author: jcompagner
Date: Sun May  4 06:42:52 2008
New Revision: 653208

URL: http://svn.apache.org/viewvc?rev=653208&view=rev
Log:
better error handling, moved stuff to a nested finally

Modified:
    wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java

Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=653208&r1=653207&r2=653208&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java (original)
+++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java Sun May  4 06:42:52 2008
@@ -384,27 +384,29 @@
 			finally
 			{
 				// Close response
-				if (response != null)
+				try
 				{
-					try
+					if (response != null)
 					{
 						response.close();
 					}
-					catch (Exception e)
-					{
-						log.error("closing the buffer error", e);
-					}
 				}
-
-				// Clean up thread local session
-				Session.unset();
-
-				if (externalCall)
+				catch (Exception e)
 				{
-					// Clean up thread local application if this was an external call
-					// (if not, doFilter will clean it up)
-					Application.unset();
-					RequestContext.unset();
+					log.error("closing the buffer error", e);
+				}
+				finally
+				{
+					// Clean up thread local session
+					Session.unset();
+
+					if (externalCall)
+					{
+						// Clean up thread local application if this was an external call
+						// (if not, doFilter will clean it up)
+						Application.unset();
+						RequestContext.unset();
+					}
 				}
 			}
 		}