From 15fa1008810eb5635e2cb2ee73675863c4c90e6d Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Tue, 30 Nov 2021 01:43:47 +0200 Subject: [PATCH] Replace with lambda --- .../controller/ControllerInitializationListenerList.java | 9 +-------- .../controller/ControllerInstantiationListenerList.java | 9 +-------- .../pippo/controller/ControllerInvokeListenerList.java | 9 +-------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInitializationListenerList.java b/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInitializationListenerList.java index 768cb1aa..2be5e089 100644 --- a/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInitializationListenerList.java +++ b/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInitializationListenerList.java @@ -25,14 +25,7 @@ public class ControllerInitializationListenerList extends ListenerList() { - - @Override - public void notify(ControllerInitializationListener listener) { - listener.onInitialize(controller); - } - - }); + notify(listener -> listener.onInitialize(controller)); } } diff --git a/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInstantiationListenerList.java b/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInstantiationListenerList.java index 1e99e9ca..e8c67856 100644 --- a/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInstantiationListenerList.java +++ b/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInstantiationListenerList.java @@ -25,14 +25,7 @@ public class ControllerInstantiationListenerList extends ListenerList() { - - @Override - public void notify(ControllerInstantiationListener listener) { - listener.onInstantiation(controller); - } - - }); + notify(listener -> listener.onInstantiation(controller)); } } diff --git a/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInvokeListenerList.java b/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInvokeListenerList.java index 42bb9c7b..05ef84e9 100644 --- a/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInvokeListenerList.java +++ b/pippo-controller-parent/pippo-controller/src/main/java/ro/pippo/controller/ControllerInvokeListenerList.java @@ -27,14 +27,7 @@ public class ControllerInvokeListenerList extends ListenerList() { - - @Override - public void notify(ControllerInvokeListener listener) { - listener.onInvoke(controller, method); - } - - }); + notify(listener -> listener.onInvoke(controller, method)); } }