Browse Source

Refactor: use yoda notation to get error in case of mistyping

remotes/origin/feature/client/exchange-messages-between-client-server
Alena Bandarovich 11 months ago
parent
commit
58c5ad97fc
  1. 2
      src/main/java/ChatClient.java

2
src/main/java/ChatClient.java

@ -20,7 +20,7 @@ public class ChatClient extends JFrame implements KeyListener {
super("Chat"); super("Chat");
address = JOptionPane.showInputDialog("bitte IP-Adresse"); address = JOptionPane.showInputDialog("bitte IP-Adresse");
if (address != null) {
if (null != address) {
receiveMessages(); receiveMessages();
} }
} }

Loading…
Cancel
Save