WICKET-3335 Print the component queue when non-empty in IQueueRegion#onDetach()
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d2493d38 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d2493d38 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d2493d38 Branch: refs/heads/master Commit: d2493d38869387c6156d312e1b788efc0ced5850 Parents: 9b3cb1a Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Authored: Mon Feb 10 15:17:13 2014 +0200 Committer: Igor Vaynberg <igor.vaynb...@gmail.com> Committed: Thu Feb 20 23:37:14 2014 -0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/wicket/ComponentQueue.java | 9 +++++++++ .../src/main/java/org/apache/wicket/MarkupContainer.java | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/d2493d38/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java index 758970b..661736c 100644 --- a/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java +++ b/wicket-core/src/main/java/org/apache/wicket/ComponentQueue.java @@ -144,4 +144,13 @@ class ComponentQueue } return null; } + + @Override + public String toString() + { + return "ComponentQueue{" + + "queueSize=" + queueSize + + ", queue=" + Arrays.toString(queue) + + '}'; + } } http://git-wip-us.apache.org/repos/asf/wicket/blob/d2493d38/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java index 19b72aa..ffd5488 100644 --- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java +++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java @@ -2009,9 +2009,9 @@ public abstract class MarkupContainer extends Component implements Iterable<Comp if (queue != null && !queue.isEmpty()) { - // TODO WICKET-3335: Print the queue ?! - throw new WicketRuntimeException("Detach called on component: " + getId() - + " while it had a non-empty queue"); + throw new WicketRuntimeException( + String.format("Detach called on component with id '%s' while it had a non-empty queue: %s", + getId(), queue)); } queue = null; }