From b70c89951dd2f6245b26c8f7c2b7778061171ab2 Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Wed, 7 Feb 2024 00:50:29 +0100 Subject: [PATCH] refactoring: Formatierung --- src/main/java/ChatServer.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index 84d84af..68eafeb 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -27,12 +27,13 @@ public class ChatServer { e.printStackTrace(); } finally { if (serverSocket != null) { - try { - serverSocket.close(); - } catch (IOException e) { - e.printStackTrace(); - }} - + try { + serverSocket.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } } @@ -40,9 +41,9 @@ public class ChatServer { public void broadcastMessage(String message) { System.out.println(message); if (message != null) { - for (ClientHandler client : clients) { - client.sendMessage(message); - } + for (ClientHandler client : clients) { + client.sendMessage(message); + } } }