]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #4204 - CssLayout throws ClassCastException when removing component with...
authorArtur Signell <artur.signell@itmill.com>
Fri, 19 Feb 2010 09:01:26 +0000 (09:01 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 19 Feb 2010 09:01:26 +0000 (09:01 +0000)
svn changeset:11390/svn branch:6.3

src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java

index bf13530d7f6566bf9d491ecca12a4783d3c92754..90cf102cb9434179ba6a644ffbf9f407359656cb 100644 (file)
@@ -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<Widget> 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);
             }
         }