From f8e2cd09c683a03f9721d124246391c6f45c8d84 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Mon, 8 Feb 2016 16:42:00 +0200 Subject: Fix removing extension from a connector that is not its parent (#19569) Change-Id: I9c40d3d85386437a640879470ab3b0cdfe042a42 --- server/src/com/vaadin/server/AbstractClientConnector.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/src/com/vaadin') 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(); -- cgit v1.2.3