diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-02-08 16:42:00 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-02-08 16:59:48 +0200 |
commit | f2b31bac2bc521945c8887b8a8c16df2d5845ac1 (patch) | |
tree | 824e9809d8c37f817b1cbecf671baa2a1fdfda07 /server/src/com/vaadin | |
parent | 6d0680b7cd9c79876682e4e8929360e31e8b15b7 (diff) | |
download | vaadin-framework-f2b31bac2bc521945c8887b8a8c16df2d5845ac1.tar.gz vaadin-framework-f2b31bac2bc521945c8887b8a8c16df2d5845ac1.zip |
Fix removing extension from a connector that is not its parent (#19569)
Change-Id: I0201c2dc94cd50d09931d54bb9e18893e6737d9c
Diffstat (limited to 'server/src/com/vaadin')
-rw-r--r-- | server/src/com/vaadin/server/AbstractClientConnector.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/AbstractClientConnector.java b/server/src/com/vaadin/server/AbstractClientConnector.java index fa2b741ddd..c624663d50 100644 --- a/server/src/com/vaadin/server/AbstractClientConnector.java +++ b/server/src/com/vaadin/server/AbstractClientConnector.java @@ -589,6 +589,11 @@ public abstract class AbstractClientConnector implements ClientConnector, @Override public void removeExtension(Extension extension) { + if (extension.getParent() != this) { + throw new IllegalArgumentException( + "This connector is not the parent for given extension"); + } + extension.setParent(null); extensions.remove(extension); markAsDirty(); |