diff options
author | Artur Signell <artur@vaadin.com> | 2015-08-03 14:09:24 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-01-07 08:23:14 +0000 |
commit | c8136d709d233db159bf14ab5b828084b7a190bc (patch) | |
tree | 1d82155de408d76ad50c0667e7050cdcb9707f3b /client | |
parent | af15d54e5a49491ebadb9748381a22239ebf8ff7 (diff) | |
download | vaadin-framework-c8136d709d233db159bf14ab5b828084b7a190bc.tar.gz vaadin-framework-c8136d709d233db159bf14ab5b828084b7a190bc.zip |
ConnectorHierarchyChangeEvent.getParent() should return the connector (#18525)
Change-Id: Ifd2151a76ff77127170f2d95a800dfb7d601a7d3
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java b/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java index 55494af0d4..267b3d3bfd 100644 --- a/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java +++ b/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java @@ -41,7 +41,6 @@ public class ConnectorHierarchyChangeEvent extends public static final Type<ConnectorHierarchyChangeHandler> TYPE = new Type<ConnectorHierarchyChangeHandler>(); List<ComponentConnector> oldChildren; - private HasComponentsConnector parent; public ConnectorHierarchyChangeEvent() { } @@ -73,18 +72,16 @@ public class ConnectorHierarchyChangeEvent extends * changed. Never returns null. */ public HasComponentsConnector getParent() { - return parent; + return (HasComponentsConnector) getConnector(); } - /** - * Sets the {@link HasComponentsConnector} for which this event occurred. - * - * @param The - * {@link HasComponentsConnector} whose child collection has - * changed. - */ - public void setParent(HasComponentsConnector parent) { - this.parent = parent; + @Override + public void setConnector(ServerConnector connector) { + assert connector instanceof HasComponentsConnector : "A ConnectorHierarchyChangeEvent " + + "can only occur for connectors implementing HasComponentsConnector. " + + connector.getClass().getName() + " does not"; + + super.setConnector(connector); } public interface ConnectorHierarchyChangeHandler extends Serializable, |