From e53a751081476e8392b7c04bde54b146b1afa867 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Fri, 15 Apr 2022 21:20:03 +0200 Subject: [PATCH] fixed Problem setting Username in ClientConnectionHandler #42 --- .../ch/zhaw/pm2/multichat/client/ClientConnectionHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientConnectionHandler.java b/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientConnectionHandler.java index 23fec7e..b5b72f9 100644 --- a/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientConnectionHandler.java +++ b/client/src/main/java/ch/zhaw/pm2/multichat/client/ClientConnectionHandler.java @@ -39,7 +39,7 @@ public class ClientConnectionHandler extends ConnectionHandler implements Runnab this.serverAddress.set(serverAddress); this.serverPort.set(serverPort); setConnection(NetworkHandler.openConnection(serverAddress, serverPort)); - this.userName = new SimpleStringProperty((userName == null || userName.isBlank())? USER_NONE : userName); + this.userName.set((userName == null || userName.isBlank())? USER_NONE : userName); } public SimpleStringProperty getServerAddressProperty() { return serverAddress; }