Author: jdonnerstag
Date: Sun Apr 5 07:53:18 2009
New Revision: 762055
URL: http://svn.apache.org/viewvc?rev=762055&view=rev
Log:
fixed WICKET-2200 Unexpected RuntimeException: RestartResponseException in
onBeforeRender of cached page
Issue: WICKET-2200
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java?rev=762055&r1=762054&r2=762055&view=diff
==============================================================================
---
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java
(original)
+++
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycle.java
Sun Apr 5 07:53:18 2009
@@ -209,9 +209,19 @@
{
// re-assign the original response
setResponse(currentResponse);
- if (ex instanceof AbortException)
+
+ /*
+ * check if the raised exception wraps an abort
exception. if so, it is probably
+ * wise to unwrap and rethrow the abort
exception
+ */
+ Throwable cause = ex;
+ while (cause != null)
{
- throw ex;
+ if (cause instanceof AbortException)
+ {
+ throw ((AbortException)cause);
+ }
+ cause = cause.getCause();
}
if (!(ex instanceof PageExpiredException))