From 622499b5761f443340c24a2519c3680aa3649e0b Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Thu, 8 Feb 2024 21:26:02 +0100 Subject: [PATCH] refactoring: cleanup destroy Methode --- .../java/de/hsfulda/onses/controllers/AppController.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/de/hsfulda/onses/controllers/AppController.java b/src/main/java/de/hsfulda/onses/controllers/AppController.java index 03a6e0a..80d6da9 100644 --- a/src/main/java/de/hsfulda/onses/controllers/AppController.java +++ b/src/main/java/de/hsfulda/onses/controllers/AppController.java @@ -42,10 +42,7 @@ public class AppController implements Controller { @Override public void destroy() { - int i = 0; - - while(i < controllers.size()) { - Controller controller = controllers.get(i++); + for (Controller controller : controllers) { controller.destroy(); } }