From 53e3bc30d45bee3b2e238621f247d9b12c216318 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 19 Feb 2010 09:01:26 +0000 Subject: [PATCH] Fix for #4204 - CssLayout throws ClassCastException when removing component with caption svn changeset:11390/svn branch:6.3 --- src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java index bf13530d7f..90cf102cb9 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java @@ -184,10 +184,11 @@ public class VCssLayout extends SimplePanel implements Paintable, Container { // loop oldWidgetWrappers that where not re-attached and unregister // them - for (final Iterator it = oldWidgets.iterator(); it - .hasNext();) { - final Paintable w = (Paintable) it.next(); - client.unregisterPaintable(w); + for (Widget w : oldWidgets) { + if (w instanceof Paintable) { + final Paintable p = (Paintable) w; + client.unregisterPaintable(p); + } widgetToCaption.remove(w); } } -- 2.39.5