From: John Ahlroos Date: Thu, 8 Nov 2012 10:03:45 +0000 (+0200) Subject: Fixed absolute layout class cast exception #10155 X-Git-Tag: 7.0.0.beta9~31^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=82a33d9a5ad36f102d2f29c1a82368bce02f1756;p=vaadin-framework.git Fixed absolute layout class cast exception #10155 Change-Id: I5a9772e2d4082453923cfdca17bcef34e833adda --- diff --git a/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java b/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java index 26ee4409fb..0cfd4fb8e5 100644 --- a/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java +++ b/client/src/com/vaadin/client/ui/absolutelayout/VAbsoluteLayout.java @@ -80,7 +80,7 @@ public class VAbsoluteLayout extends ComplexPanel { wrapper.destroy(); return super.remove(wrapper); } - return false; + return super.remove(w); } /** @@ -246,9 +246,11 @@ public class VAbsoluteLayout extends ComplexPanel { */ protected AbsoluteWrapper getChildWrapper(Widget child) { for (Widget w : getChildren()) { - AbsoluteWrapper wrapper = (AbsoluteWrapper) w; - if (wrapper.getWidget() == child) { - return wrapper; + if (w instanceof AbsoluteWrapper) { + AbsoluteWrapper wrapper = (AbsoluteWrapper) w; + if (wrapper.getWidget() == child) { + return wrapper; + } } } return null;