Updated Branches: refs/heads/master 842043034 -> 07a0003cf
WICKET-4622 Optimize PageExpiredException to not load its stacktrace Remove the 'synchronized' for ReplaceHandlerException because it is not really needed, we just return null. Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/07a0003c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/07a0003c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/07a0003c Branch: refs/heads/master Commit: 07a0003cf98053c39eabd66fc1790d68e8069521 Parents: 8420430 Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Authored: Fri Jun 22 11:54:17 2012 +0300 Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Committed: Fri Jun 22 11:54:17 2012 +0300 ---------------------------------------------------------------------- .../wicket/protocol/http/PageExpiredException.java | 17 ++++++++++++++- .../apache/wicket/request/RequestHandlerStack.java | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/07a0003c/wicket-core/src/main/java/org/apache/wicket/protocol/http/PageExpiredException.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/PageExpiredException.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/PageExpiredException.java index 186bb3f..14fcc58 100644 --- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/PageExpiredException.java +++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/PageExpiredException.java @@ -33,7 +33,10 @@ import org.apache.wicket.settings.IStoreSettings; * <li>the http session has expired and thus all pages related to this session are erased too</li> * <li>the page instance has been erased because the store size exceeded</li> * </ul> - * + * + * <p>This exception is used to tell Wicket to respond with the configured PageExpiredPage, so its + * stacktrace it is not really needed.</p> + * * @see HttpSession#setMaxInactiveInterval(int) * @see IStoreSettings#setMaxSizePerSession(org.apache.wicket.util.lang.Bytes) * @see NotSerializableException @@ -61,4 +64,16 @@ public class PageExpiredException extends WicketRuntimeException { super(message, cause); } + + /** + * Suppress loading of the stacktrace because it is not needed. + * + * @see java.lang.Throwable#fillInStackTrace() + */ + @Override + public Throwable fillInStackTrace() + { + // don't do anything here + return null; + } } http://git-wip-us.apache.org/repos/asf/wicket/blob/07a0003c/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerStack.java ---------------------------------------------------------------------- diff --git a/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerStack.java b/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerStack.java index 8a427a5..4267888 100644 --- a/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerStack.java +++ b/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerStack.java @@ -223,7 +223,7 @@ public abstract class RequestHandlerStack * @see java.lang.Throwable#fillInStackTrace() */ @Override - public synchronized Throwable fillInStackTrace() + public Throwable fillInStackTrace() { // don't do anything here return null;