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; }