TD2: Check for message text emptyness.
[TD_SR.git] / TD2 / client / ThreadClientoSend.java
index 1d7e232ffd794bde82be90199f8662d283cf02f7..2475be6d7c80245e5b00eb830d0ff4c778c14e85 100644 (file)
@@ -38,7 +38,7 @@ public class ThreadClientoSend implements Runnable {
                 if (line.equals(".")) {
                     end = true;
                 }
-                if (line.length() != 0) {
+                if (!line.isEmpty()) {
                     Message oMsg = new Message(randName, line, Calendar.getInstance());
                     client.sendoMsg(oMsg);
                     System.out.println(Thread.currentThread().getName() + " a envoye " + oMsg);