This is an automated email from the ASF dual-hosted git repository. svenmeier pushed a commit to branch WICKET-6908-detach-failure in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 05ab77655fb00d27ade1402b72db1dc6968b3dbe Author: Sven Meier <svenme...@apache.org> AuthorDate: Mon Jul 26 22:03:05 2021 +0200 WICKET-6908 detach all handlers even if one throws a RuntimeException --- .../apache/wicket/request/RequestHandlerExecutor.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerExecutor.java b/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerExecutor.java index f60b27a..47df808 100644 --- a/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerExecutor.java +++ b/wicket-request/src/main/java/org/apache/wicket/request/RequestHandlerExecutor.java @@ -132,21 +132,27 @@ public abstract class RequestHandlerExecutor active = null; } + RuntimeException rethrow = null;; for (IRequestHandler handler : inactiveRequestHandlers) { try { detach(handler); } - catch (RuntimeException exception) - { - throw exception; - } catch (Exception exception) { - log.error("Error detaching RequestHandler", exception); + if (rethrow == null && exception instanceof RuntimeException) { + rethrow = (RuntimeException) exception; + } else { + log.error("Error detaching RequestHandler", exception); + } } } + if (rethrow != null) { + // WICKET-6001 runtime exceptions are rethrown + // TODO obsolete should component-queueing be removed + throw rethrow; + } } /**