aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java')
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java b/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java
index dc92ece1e9..fbb937e148 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractSingleComponentContainer.java
@@ -60,9 +60,7 @@ public abstract class AbstractSingleComponentContainer extends AbstractComponent
@Override
public Registration addComponentAttachListener(
ComponentAttachListener listener) {
- addListener(ComponentAttachEvent.class, listener,
- ComponentAttachListener.attachMethod);
- return () -> removeListener(ComponentAttachEvent.class, listener,
+ return addListener(ComponentAttachEvent.class, listener,
ComponentAttachListener.attachMethod);
}
@@ -79,9 +77,7 @@ public abstract class AbstractSingleComponentContainer extends AbstractComponent
@Override
public Registration addComponentDetachListener(
ComponentDetachListener listener) {
- addListener(ComponentDetachEvent.class, listener,
- ComponentDetachListener.detachMethod);
- return () -> removeListener(ComponentDetachEvent.class, listener,
+ return addListener(ComponentDetachEvent.class, listener,
ComponentDetachListener.detachMethod);
}