repositories
/
TD_SR.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TD2: Ensure chat clients will not send empty message.
[TD_SR.git]
/
TD2
/
IHM
/
ThreadIHMSend.java
diff --git
a/TD2/IHM/ThreadIHMSend.java
b/TD2/IHM/ThreadIHMSend.java
index 2b1a64aba6b80590f8505ed4dff8e70f8f764474..f8077c968fdf03ed6dc4098fc04670180418d282 100644
(file)
--- a/
TD2/IHM/ThreadIHMSend.java
+++ b/
TD2/IHM/ThreadIHMSend.java
@@
-17,8
+17,10
@@
public class ThreadIHMSend implements Runnable {
if (line.equals(".")) {
end = true;
}
if (line.equals(".")) {
end = true;
}
- client.sendMsg(line);
- System.out.println(Thread.currentThread().getName() + " a envoye " + line);
+ if (line.length() != 0) {
+ client.sendMsg(line);
+ System.out.println(Thread.currentThread().getName() + " a envoye " + line);
+ }
}
}
catch (Exception e) {
}
}
catch (Exception e) {